參考
--
Private Sub Label1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Label1.Paint
'上
e.Graphics.DrawLine(New Pen(System.Drawing.Brushes.Black, 1), New Point(0, 0), New Point(Label1.Width - 1, 0))
'左
e.Graphics.DrawLine(New Pen(System.Drawing.Brushes.Black, 1), New Point(0, 0), New Point(0, Label1.Height - 1))
'右
e.Graphics.DrawLine(New Pen(System.Drawing.Brushes.Black, 1), New Point(Label1.Width - 1, 0), New Point(Label1.Width - 1, Label1.Height - 1))
'下
e.Graphics.DrawLine(New Pen(System.Drawing.Brushes.Black, 1), New Point(0, Label1.Height - 1), New Point(Label1.Width - 1, Label1.Height - 1))
End Sub
沒有留言:
張貼留言