How to create a Form with own style?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

is there a turorial how to create an own window (e.g. rounded edges or sth. else)
Is there a turial too, how to create own buttons (e.g. a round one)
 
I just posted an answer to this in another newsgroup :)

For a control ->

Step #1. Set Controlbackground as transparent using SetStyle in the
constructor, and backgroundcolor = transparent. Also set, UserPaint,
ResizeRedraw, AllPaintingInWMPaint
Step #2. In your OnPaint of your UserControl
Create a graphicsPath
Graphicspath = new Drawing2D.GraphicsPath, and then use
AddArc and AddLine to create the relevant RoundedCorners Path, and then do
YourGraphics.FillPath(Brush, GraphicsBath)


For a form -> Create a System.Drawing.Region, and set the form.region = that
region you just created.

- Sahil Malik
Independent Consultant
You can reach me thru my blog - http://dotnetjunkies.com/WebLog/sahilmalik/
 
Back
Top