How can I create a rounded panel?
-
Sunday, July 30, 2006 5:51 PM
How can I create a rounded panel?
Thanks,
All Replies
-
Sunday, July 30, 2006 6:16 PM
by default any windows control has a rectangle region so if you want to give it another shape create shape region for what you asked for look at
http://www.codeproject.com/vb/net/AlphaGradientPanel.asp
http://www.codeproject.com/vb/net/custompanel.asp
it have what you want in vb.net but as you know you can use assembly writin in another .net language in c# or convert its code to c#
-
Sunday, July 30, 2006 8:48 PM
Hi,
You need to create a custom control.
1) Add a custom control Item in your project
2) Change the inheritance to "ContainerControl"
3) Override the OnPaint() method
4) Use the Graphics object (exposed by the function parameter) to draw your own control.Some examples:
http://www.codeproject.com/cs/miscctrl/AnalogClockControl.asp
Hope this helps!

