Mouse Events in VB



Mouse Events

Screen Design






Source Code


Private Sub Form_Load()
Option1.Value = False
Option2.Value = False
ImgSun.Height = 900
ImgSun.Width = 1200

ImgWinter.Height = 900
ImgWinter.Width = 1200


End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Option1 = True Then
ImgSun.Move X, Y
Else
ImgWinter.Move X, Y
End If



End Sub