您的位置:首页 > 其它

对按钮重新绘制

2007-10-07 12:58 197 查看



Private Sub Button2_Paint()Sub Button2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Button2.Paint




Dim MyGp As New System.Drawing.Drawing2D.GraphicsPath


MyGp.AddEllipse(New Rectangle(-50, -50, 125, 125))


MyGp.AddEllipse(New Rectangle(55, 55, 20, 20))


' MyGp.AddEllipse(New Rectangle(0, 0, 125, 125))


'MyGp.AddEllipse(New Rectangle(0, 0, 125, 125))


Button2.BackColor = Color.Blue


Button2.BackgroundImage = Image.FromFile("F:壁纸 _6289.jpg")


MyGp.AddString("中华人民共和国", New FontFamily("宋体"), FontStyle.Regular, 15, New PointF(5, 40), StringFormat.GenericDefault)




'Button2.Size = New Size(256, 256)


Button2.Region = New Region(MyGp)


End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: