Есть форма без заголовка, без рамки.
Как можно сделать в VB.NET закруглённые углы у формы?
Imports System.Drawing.Drawing2D
Imports System.Drawing
Public Class Form1
Dim GP As New GraphicsPath
Dim P As New Pen(Color.Black, 5)
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.ControlBox = False
Me.Size = New Size(380, 300)
Me.Text = ""
Dim FF As New FontFamily("Arial BLack")
Dim Pnt As New PointF(0.0!, 50.0!)
Dim Rect As Rectangle = Me.ClientRectangle
Dim FS As FontStyle = FontStyle.Regular
Dim SF As New StringFormat()
SF.LineAlignment = StringAlignment.Center
GP.AddEllipse(Me.ClientRectangle)
GP.AddString("Round", FF, FS, 100.0!, Pnt, SF)
Me.Region = New Region(GP)
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.FillPath(Brushes.AliceBlue, GP)
e.Graphics.DrawPath(P, GP)
End Sub
End Class
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 98