关键是解决MOUSE移出问题
在MOUSE移出时,系统会发出一个MOUSE移动事件,也就是你在MOUSE移动事件中检测MOUSE当前位置,如果不在目标区域内则表示MOUSE移出,否则表示移入
在MOUSE移出时,系统会发出一个MOUSE移动事件,也就是你在MOUSE移动事件中检测MOUSE当前位置,如果不在目标区域内则表示MOUSE移出,否则表示移入
解决方案 »
- 怎么获取文本框中文字的行数
- 将所有内容装入一个记录集
- asp作客户端,vb作服务器端能够实现吗?
- 在对临时表作修改后保存的时候,出错,意思是临时表找不到?碰到这样的问题(数据保存不了),应该怎么处理?
- 求助:vb 打包问题
- 函数名后的$起到什么作用呢?
- 请问这是什么控件?外观上象datagrid,但点击上面的标题行能使相应字段按序排列,再点击变换为另一种排序方式?
- 请问如果一个下拉列表框已经和库中谋个表的谋个字段绑定了,还可不可以给他赋值?
- 为什么在我的VB中 "©" 符号 显示 的是一个 "?",请问该怎么解决?
- 谁知道哪里能下载VB的MP3播放控件和它的注册号啊?
- 请问用VB开发。DLL,调试该怎么调试啊?
- 中国虽然失利,但愿下一场球能有好的表现,散分,10分钟后结
三个Picturebox
Dim aaa
Private Sub Form_Load()
Picture2.Picture = LoadPicture("c:\1.jpg")
Picture3.Picture = LoadPicture("c:\2.gif")
Picture2.Visible = False
Picture3.Visible = False
Picture1.Picture = Picture3.Picture
aaa = 1
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If aaa = 1 Then
Picture1.Picture = Picture2.Picture
aaa = 2
End If
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If aaa = 2 Then
Picture1.Picture = Picture3.Picture
aaa = 1
End If
End Sub
Private Sub Form_Load()
Picture2.Picture = LoadPicture("c:\1.jpg")
Picture3.Picture = LoadPicture("c:\2.jpg")
Picture2.Visible = False
Picture3.Visible = False
Picture1.Picture = Picture3.Picture
aaa = 1
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If aaa = 1 Then
Picture1.Picture = Picture2.Picture
aaa = 2
End If
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If aaa = 2 Then
Picture1.Picture = Picture3.Picture
aaa = 1
End If
End Sub
If button = 1 Then
Picture1.Picture = loadpicture("图片1")
End If
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
if button=1
Picture1.Picture = loadpicture("图片2")
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 Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Picture1
If Button = 0 Then
If (X < 0) Or (Y < 0) Or (X > .Width) Or (Y > .Height) Then
ReleaseCapture
' 放入鼠标离开的代码
Else
SetCapture .hwnd
' 放入鼠标进入的代码
End If
End With