changing a form to a circle in VB.NET 2003

  • Thread starter Thread starter Thorgal
  • Start date Start date
T

Thorgal

Hello,

I want to change a form in VB.NET 2003 from a square to a circle or
elipse, is this possible, so that i'm working with a circle instead of
a normal form?

thanks
 
I want to change a form in VB.NET 2003 from a square to a circle or
elipse, is this possible

Yes.

To demonstrate a quick way pull up MS Paint and change the background
from white to black. Now draw a white circle in the center of the black
background and save the bmp. Then in VB's form designer set the form's
background to the bmp you just created and set the form's transparency
key to Web.Black. Run the form and it should be just a white circle.

That's one quick way - although I normally use Web.Lime or some other
rarely used color to prevent accidentally making something else
transparent. Then you might want to change the form border style to
"none" to remove the title bar.

For more ways and for learning how to drag a form without a titlebar
please search this ng's archives at
http://groups.google.com/group/microsoft.public.dotnet.languages.vb?lnk=sg&hl=en
Most topics are covered there.

Thanks,

Seth Rowe
 
Thorgal said:
I want to change a form in VB.NET 2003 from a square to a circle or
elipse, is this possible, so that i'm working with a circle instead of
a normal form?

Check out the 'GraphicsPath' and 'Region' classes. Assign the circular
region to the form's 'Region' property at runtime.
 
Back
Top