A1VBCode Forums

transparent form


http://www.a1vbcode.com/vbforums/Topic2851.aspx

By T1nM4n - 8/20/2004

is there some sort of way to make a form have transparent parts, like lets say ia have an image that has transparent parts, how could i make that image be the background of my form and have the transparent parts of the image be transparent so like if i have an image of a ball, how could i make it so the form was shaped liek a circle

thnx
t1n
By James - 8/23/2004

Ok heres a step by step guide.

  • Open Standard Exe
  • Add an image to the forms picture property
  • Go Projects > Components>Browse find the .OCX file I put in the zip file
  • Click ok
  • Add the control to your form
  • In the Form_Load() event add
  • CustomScreen1.Run FormName
  • And in the Unload event
  • CustomScreen1.Und FormName
  • Add an exit command button and code to unload not end
  • Run and test the app

This is the image I used. You'll notice I've picked pink as my background. What the control will do is analyse twip 0,0 (top left twip in this case pink) and then search every twip looking for the same color. Upon finding the color the control makes that twip transparent and enables you to use cusom regions.

Hope this helps

James