Option Explicit
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 hr&, dl&
Dim usew&, useh&
usew& = Command1.Width / Screen.TwipsPerPixelX
useh& = Command1.Height / Screen.TwipsPerPixelY
hr& = CreateEllipticRgn(0, 0, usew, useh)
dl& = SetWindowRgn(Command1.hWnd, hr, True)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 hr&, dl&
Dim usew&, useh&
usew& = Command1.Width / Screen.TwipsPerPixelX
useh& = Command1.Height / Screen.TwipsPerPixelY
hr& = CreateEllipticRgn(0, 0, usew, useh)
dl& = SetWindowRgn(Command1.hWnd, hr, True)End Sub
网上找两幅按钮的图片(一个弹起的,一个按下的)
界面上放一个image控件
在image控件中检查mousedown和mouseup事件
更换图片就行了.
用Flash做出你想要的按钮(透明的那种)
想要什么样的都行.
在image控件上放一个label控件
字写在里面
区别是mouseDown与mouseUp中的代码应该写在label控件里了
image控件的作用就只是放图片用