Results 1 to 2 of 2

Thread: picturebox button cL1ck effect

  1. #1

    Thread Starter
    Fanatic Member scr0p's Avatar
    Join Date
    Oct 2002
    Location
    VA
    Posts
    720

    picturebox button cL1ck effect

    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 ?
    asdf

  2. #2
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    VB Code:
    1. Private Sub Form_Load()
    2. With Picture1
    3.     .AutoSize = True
    4.     .ScaleMode = vbPixels
    5.     .Picture = LoadPicture("D:\kaushik\cclogo.bmp")
    6. End With
    7. End Sub
    8.  
    9.  
    10. Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    11. If Button = vbLeftButton Then
    12.     With Picture1
    13.         .Move .Left + 3, .Top + 3
    14.     End With
    15. End If
    16. End Sub
    17.  
    18. Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    19. If Button = vbLeftButton Then
    20.     With Picture1
    21.         .Move .Left - 3, .Top - 3
    22.     End With
    23. End If
    24. End Sub

    HTH

    Regards

    KayJay

    "Brothers, you asked for it."
    ...Francisco Domingo Carlos Andres Sebastian D'Anconia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width