Steve
Fri May 14 12:15:53 CDT 2004
This is perfect!
Thank you so much.
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:2gjvjiF3i6a3U4@uni-berlin.de...
> * "Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> scripsit:
> > I have a borderless form with it's Opacity set to 60% so the background
> > shows through. It looks very nice. But I'd like to round the corners
of
> > this form. All the techniques I've seen so far for creating shaped
forms
> > involve using the TransparencyKey property of the form. But this
doesn't
> > work with a form that is translucent because the form color varies at
> > runtime based on the background colors that are showing through.
>
> \\\
> \\\
> 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
> p.Dispose()
> ///
>
> --
> Herfried K. Wagner [MVP]
> <URL:
http://dotnet.mvps.org/>