使用VB的image控件编程出现了一个问题 5
帮看看我这个代码(下面)出现什么错误了,帮忙修改一下,谢谢!!!PrivateDeclareFunctionSetCaptureLib"user32"(ByValhwnd...
帮看看我这个代码(下面)出现什么错误了,帮忙修改一下,谢谢!!!
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Image4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image4.Picture = Image3.Picture
End Sub
Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X > 0 And X < Image4.Width And Y > 0 And Y < Image4.Height Then
Image4.Picture = Image2.Picture
SetCapture (Image4.hwnd)
Else
Image4.Picture = Image1.Picture
ReleaseCapture
End If
End Sub 展开
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Image4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image4.Picture = Image3.Picture
End Sub
Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X > 0 And X < Image4.Width And Y > 0 And Y < Image4.Height Then
Image4.Picture = Image2.Picture
SetCapture (Image4.hwnd)
Else
Image4.Picture = Image1.Picture
ReleaseCapture
End If
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询