Results 1 to 5 of 5

Thread: On Mouse Over Equivlencies

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    7

    Red face

    Just a forewarning, my spelling sucks... Im am very new to VB [Running VB 6 for a little over a week now], and was wondering if thier was a way to change the picture in the picture box, when it has focus, and then change back when focus is lost. Kinda like ajavascript OnMouseOver Function, and would thier be a way to implement sound for this action 2? Help would be greatly appreciated, I don't have any textbooks, or the MSDN, so every thing i know about VB has just been me experimenting.

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Hm I am not that new to VB. I think there is no real way to do this in normal VB code! Of course you can do a lot of stuff, but To me it seemed to be to complicated, because I never really needed it!
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    7

    Red face

    Ahh, oh well. It was worth a shot, thanks alot for taking the time to reply, and you'll be seeing me on the forum a fair bit....

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    7

    Talking I Got on Mouse Over Working

    I fooled around a bit, and figured that the code:
    Private Sub picBack_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim MouseOverPic As Picture
    Set MouseOverPic = LoadPicture("C:\dominatrix\Buttons\BackOnMouse.bmp")
    Set picBack.Picture = MouseOverPic
    End Sub

    and:
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Set picBack.Picture = LoadPicture("C:\dominatrix\Buttons\Back.bmp")
    End Sub

    Have virtually the same effect as a mouse over... ound wont be hard to do now ethier.


  5. #5
    New Member
    Join Date
    Oct 2000
    Location
    Boston
    Posts
    2

    May have a flaw

    That's a nice workaround but there might be a flaw with this approach.

    I notice that you check the mouse move event of the form to turn the picture back. Good thinking.

    What if you have many controls on the form along with the picture box? You would have to check mouse move event on all shown control to change the picture back.

    I would have liked VB to have a mouse leave control event, but i haven't seen it yet.

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