|
-
Nov 17th, 2000, 07:09 PM
#1
Thread Starter
New Member
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.
-
Nov 17th, 2000, 09:15 PM
#2
Frenzied Member
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!
-
Nov 18th, 2000, 11:53 AM
#3
Thread Starter
New Member
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....
-
Nov 18th, 2000, 03:41 PM
#4
Thread Starter
New Member
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.
-
Nov 23rd, 2000, 07:59 AM
#5
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|