Private Const BORDER_DIAMETER As Short = 1445
Private Const FORM_DIAMETER As Short = 18000
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Integer, ByVal hRgn As Integer, ByVal bRedraw As Integer) As Integer
Dim i, j As Short
Dim hr, dl As Integer
Dim usew, useh As Integer
'Make round form
Me.Width = FORM_DIAMETER
Me.Height = FORM_DIAMETER
usew = Me.Width / FORM_DIAMETER
useh = Me.Height / FORM_DIAMETER
hr = CreateEllipticRgn(400, 419, usew, useh)
dl = SetWindowRgn(Me.Handle.ToInt32, hr, True)
Me.Height = (FORM_DIAMETER + 50)
Me.Width = (FORM_DIAMETER + 50)
http://www.thescripts.com/forum/thread352802.html
شاید جواب بهتری اینجا باشد.
باز سرچ کن تا جواب درست تری را بیابی.
هیچی از این متوجه نشدم.
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Dim p As New Drawing2D.GraphicsPath()
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 35, 35), 180, 90)
p.AddLine(35, 0, Me.Width - 35, 0)
p.AddArc(New Rectangle(Me.Width - 35, 0, 35, 35), -90, 90)
p.AddLine(Me.Width, 35, Me.Width, Me.Height - 35)
p.AddArc(New Rectangle(Me.Width - 35, Me.Height - 35, 35, 35), 0, 90)
p.AddLine(Me.Width - 35, Me.Height, 35, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 35, 35, 35), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Dim p As New Drawing2D.GraphicsPath()
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 1, 1), 0, 0)
p.AddLine(0, 0, Me.Width, 0)
p.AddArc(New Rectangle(Me.Width - 30, Me.Height - 30, 30, 30), 0, 90)
p.AddLine(Me.Width - 30, Me.Height, 30, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 30, 30, 30), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)