VB深度问题: Picture按钮的index问题
来源:百度知道 编辑:UC知道 时间:2024/06/06 04:11:51
我想请高手将此程序改成Picture带index,实现多个模拟按钮的效果:
Private Sub Form_Load()
With Picture1
.AutoRedraw = True
.BorderStyle = 0
.DrawWidth = 2
End With
Picture1.Print
Picture1.Print " 退出"
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call DrawButton(Picture1, 7, 7)
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> 1 Then
Call DrawButton(Picture1, 15, 0) ' tu
End If
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Call DrawBu
Private Sub Form_Load()
For i = 0 To Picture1.UBound
With Picture1(i)
.AutoRedraw = True
.BorderStyle = 0
.DrawWidth = 2
End With
Next
Picture1(0).Print
Picture1(0).Print " 退出"
Picture1(1).Print
Picture1(1).Print " 开始"
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To Picture1.UBound
Call DrawButton(Picture1(i), 7, 7)
Next
End Sub
Private Sub Picture1_MouseMove(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> 1 Then
Call DrawButton(Picture1(index), 15, 0) ' tu
End If
End Sub
Private Sub Picture1_MouseDown(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Call DrawButton(Picture1(index), 0, 15)
End If
End Sub