I have a pic box, wehn the user clicks it and lets go, I want the picture to.. "click" (go right by 3 pixels and down by 3 pixels when mosue is held, and when released, put back to normal), how would I ?
Printable View
I have a pic box, wehn the user clicks it and lets go, I want the picture to.. "click" (go right by 3 pixels and down by 3 pixels when mosue is held, and when released, put back to normal), how would I ?
VB Code:
Private Sub Form_Load() With Picture1 .AutoSize = True .ScaleMode = vbPixels .Picture = LoadPicture("D:\kaushik\cclogo.bmp") End With End Sub Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then With Picture1 .Move .Left + 3, .Top + 3 End With End If End Sub Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then With Picture1 .Move .Left - 3, .Top - 3 End With End If End Sub
HTH :)
Regards
KayJay