I have seen this done in other applications.
OHM
Quick and dirty:
\\\
Me.FormBorderStyle = FormBorderStyle.None
Me.Height = 300
Me.Width = 400
Dim p As New Drawing2D.GraphicsPath()
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90)
p.AddLine(40, 0, Me.Width - 40, 0)
p.AddArc(New Rectangle(Me.Width - 40, 0, 40, 40), -90, 90)
p.AddLine(Me.Width, 40, Me.Width, Me.Height - 40)
p.AddArc(New Rectangle(Me.Width - 40, Me.Height - 40, 40, 40), 0, 90)
p.AddLine(Me.Width - 40, Me.Height, 40, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)
Me.BackColor = Color.Red
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Sorry - OHM
Try this:
Me.FormBorderStyle = FormBorderStyle.None
' this would make the form purely the designated color, without
' the control or windowstate menus and without a caption, drag top, icon,
etc.
Me.Height = 688
Me.Width = 360
Dim p As New Drawing2D.GraphicsPath
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90)
p.AddLine(40, 0, Me.Width - 40, 0)
p.AddArc(New Rectangle(Me.Width - 40, 0, 40, 40), -90, 90)
p.AddLine(Me.Width, 40, Me.Width, Me.Height - 40)
p.AddArc(New Rectangle(Me.Width - 40, Me.Height - 40, 40, 40), 0, 90)
p.AddLine(Me.Width - 40, Me.Height, 40, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)
Me.BackColor = Color.Thistle
HTH,
Bernie Yaeger
"Mike D" <dib...@hotmail.com> wrote in message
news:%234lKCZ4...@TK2MSFTNGP10.phx.gbl...
See, What I am trying to do is to keep the Border. Both examples have had
me turn it off. What I really would like to accomplish is to give users an
easier flowing lookng solution instead of all squared corners.
Something that can resized and still keep it's corners.
"Bernie Yaeger" <ber...@cherwellinc.com> wrote in message
news:e0zcRK6r...@TK2MSFTNGP11.phx.gbl...
You will have to create a new region as shown in the sample with
appropriate size and reassign it to the form's 'Region' property.
The solution only shows one way to create the irregularly shaped form.
You can archieve similar appearance by specifying the form's
'TransparenceKey' property (but I like setting the 'Region' more).
> NOPE. Sorry but thanks anyways.
>
> See, What I am trying to do is to keep the Border. Both examples have had
What you'll probably have to do is draw the border in the forms Paint
event. I have done that with a circular form. After assigning a circular
region, in the paint event, I had to manually draw the border.
If you need the form to be resizable, then when the forms size changes,
you'll have to recalcuate the region. The paint event should handle
drawing the border and caption.
Try asking in the drawing groups for more information as well. I may try
to make a simple example for myself. If it turns out OK, I post it.
--
Chris
To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Bernie
"Herfried K. Wagner [MVP]" <hirf-spa...@gmx.at> wrote in message
news:bpj8ae$1orbvv$2...@ID-208219.news.uni-berlin.de...
No problem... Thx!
OHM
Seems I am over my head yet in this field and will do as asked and resume
in the drawings group. I have read many vb books and always just skip right
over the drawings parts of the books thinking, I do nothing but databases, I
will never need that stuff. LOL. Funny how things come back in time to slap
you in your face when you aren't looking. Should have read those chapeters
on drawing now shouldn't I..
"Bernie Yaeger" <ber...@cherwellinc.com> wrote in message
news:e3w1ZO8r...@TK2MSFTNGP09.phx.gbl...