Click here to Skip to main content
Click here to Skip to main content

Demonstration of opacity and transparency key for making non rectangular forms

, 30 Jun 2006
Rate this:
Please Sign up or sign in to vote.
Demonstration of opacity and transparency key for making non rectangular forms

Sample Image - notepad.jpg

Introduction

This is the sample code to demonstrate the two properties which are provided by visual studio. This project is made using visual studio 2005 that uses dot net framework 2.so you should have to download dot net frame work 2 to run this project. In order to use the transparency effect there is a property in visual studio named opacity we can use this property to give the fade out and fade in effect. For making this we use the following code snippet .this code is inserted in form_load.

 

Dim i As Double

        For i = 0 To 1 Step 0.1

            Threading.Thread.Sleep(112)

            Me.Opacity = i

            Me.Visible = True

        Next

 

By increasing the sleep value we can increase the delay in the fade effect.

 

To change the shape of the form we have to change the transparency key to a color which will not match with the color of the image form which we can make by using any graphics tool. I have used adobe CS for this purpose and made a background image for the form.

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Muhammad Sheraz Lodhi
Web Developer
Pakistan Pakistan
University Of Engineering And Technology Taxila,Pakistan

Comments and Discussions

 
GeneralMake a form of any shape PinmemberWarrick Procter30-Jan-08 12:26 
GeneralRe: Make a form of any shape Pinmemberalirazasoft115-Jul-09 7:40 
GeneralNice & simple Pinmemberlvlhieu18-Jan-07 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 30 Jun 2006
Article Copyright 2006 by Muhammad Sheraz Lodhi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid