|
|
|
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:
- Add a Vertical Scrollbar Control to your form. Set its Name property to scvOpacity.
- 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.
- Add a Label control to your form. Change its Name Property to lblOpacity.
- Add the following two lines of code to the scrollbar's Scroll event:
|
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 ) |
|
|