Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Create Transparent Forms in VB.NET

Total Hit ( 2002)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Generally, the classes form the System.Drawing namespace are used to draw objects and print text directly on a form or control. However you can have some interesting visual effects by modifying just a few properties of a form.

There are two new properties now which will allow you to create transparent forms - the Opacity and TransparencyKey properties. Here I will cover only the Opacity property.
To use the Opacity property, assign a double value between 0 to 1 to represent the opacity form 0 to 100%.
The following steps will help you see the Opacity property in action:
  1. Add a Vertical Scrollbar Control to your form. Set its Name property to scvOpacity.

  2. The Min and Max properties of the scrollbar should already be set to 0 and 100 respectively. Set the Value property of the scrollbar to 100.

  3. Add a Label control to your form. Change its Name Property to lblOpacity.

  4. Add the following two lines of code to the scrollbar's Scroll event:

Click here to copy the following block
Me.Opacity = scvOpacity.Value / 100
lblOpacity.Text = Me.Opacity.ToString

Now run the sample program. As you move the scrollbar, the form should become transparent !


Submitted By : SaiKiran Jetti  (Member Since : 8/21/2004 9:16:25 AM)

Job Description : I'm computer engineer. I mostly work on Oracle databases - PL/SQL and Developer 9i. I've worked for the IS dept. of a large insurance company and am now working for a software consulting firm. I am also a freelance writer - I write technical articles about Oracle databases and database fundamentals.
View all (8) submissions by this author  (Birth Date : 4/7/1980 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.