如何修改VB里面按钮的形状?
3个回答
2013-09-25
展开全部
有点复杂 不过我可以改成椭圆形或者圆形新建一个command1 '函数声明 设置椭圆形窗体
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, _
ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _
ByVal hRgn As Long, ByVal bRedraw As Long) As LongPrivate Sub Form_Load()
Dim a, b As Long
Dim w, h As Long
h = Command1.Height / 15 '圆高直径=Command1.Height
w = Command1.Width / 15 '圆宽直径 = h
a = CreateEllipticRgn(0, 0, w, h)
b = SetWindowRgn(Command1.hWnd, a, True) '把Command1设置成圆形
End Sub
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, _
ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _
ByVal hRgn As Long, ByVal bRedraw As Long) As LongPrivate Sub Form_Load()
Dim a, b As Long
Dim w, h As Long
h = Command1.Height / 15 '圆高直径=Command1.Height
w = Command1.Width / 15 '圆宽直径 = h
a = CreateEllipticRgn(0, 0, w, h)
b = SetWindowRgn(Command1.hWnd, a, True) '把Command1设置成圆形
End Sub
2013-09-25
展开全部
选中然后就可以更改了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询