Thread View: comp.lang.basic.visual
5 messages
5 total messages
Started by DragonEyes
Sun, 25 Jan 1998 00:00
HELP: Mouseover in VB5
Author: DragonEyes
Date: Sun, 25 Jan 1998 00:00
Date: Sun, 25 Jan 1998 00:00
22 lines
2009 bytes
2009 bytes
Is there any possible way in VB5 to great and on mouse over event?? like when the user move the mouse over a label and the VB show a picture box and when the user mouse out it's run a procedure getting read of the picture box. This is a question I have been trying to solve for a little bit. PLEASE HELP ME out. Thank you! If you could E-Mail some code or samples that would be great. Thanks -- SnapDragon E-Mail cooltj@concentric.net WI Marketplace http:\\www.wimall\jr-ent\ VenerNet Web Hosting http://www.vener.net/rep/tysrwlings-server.shtml Dracot's Dragons http:\\www.concentric.net\~cooltj\DragonWeb.shtml Midi Music http:\\www.concentric.net\~cooltj\MidiMusic.shtml Web Master's http:\\www.concentric.net\~cooltj\index.shtml
Re: HELP: Mouseover in VB5
Author: Andrew Kennedy-Skipton
Date: Mon, 26 Jan 1998 00:00
Date: Mon, 26 Jan 1998 00:00
34 lines
2470 bytes
2470 bytes
There's a ZD Tip which shows access to the Windows API so that you can display the complete contents of a text box in a tool-tip when the mouse is over it. Perhaps you could adapt this code to perform the task you mentioned. I don't have the code sample from the tip but you could check out the www.zdtips.com to see if the code fragment is there. Andrew DragonEyes wrote in message <6ah785$pfd@examiner.concentric.net>... >Is there any possible way in VB5 to great and on mouse over event?? like >when the user move the mouse over a label and the VB show a picture box and >when the user mouse out it's run a procedure getting read of the picture >box. This is a question I have been trying to solve for a little bit. PLEASE >HELP ME out. Thank you! If you could E-Mail some code or samples that would >be great. Thanks > >-- >SnapDragon >E-Mail >cooltj@concentric.net >WI Marketplace >http:\\www.wimall\jr-ent\ >VenerNet Web Hosting >http://www.vener.net/rep/tysrwlings-server.shtml >Dracot's Dragons >http:\\www.concentric.net\~cooltj\DragonWeb.shtml >Midi Music >http:\\www.concentric.net\~cooltj\MidiMusic.shtml >Web Master's >http:\\www.concentric.net\~cooltj\index.shtml > >
Re: HELP: Mouseover in VB5
Author: Gustavo Huffenbacher Daud
Date: Mon, 26 Jan 1998 00:00
Date: Mon, 26 Jan 1998 00:00
36 lines
2446 bytes
2446 bytes
There a easy way to do it.
First of all, you must include this api declaration into your file:
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Due to some api limitations, you can only use this to controls that have the
.hwnd, but I'm sure that you'll figure out how to fix this.
Let's suppose that you want that a picturebox (picture1) changes its color when
the user moves the mouse in and return to the original color when the user moves
the mouse out.
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single,
Y As Single)
With Picture1
If Button = 0 Then ' To this only if no button is pressed
If (X < 0) Or (Y < 0) Or (X > .Width) Or (Y > .Height) Then
'When the cursor goes out:
ReleaseCapture
.backcolor=.forecolor
Else
'When the cursor goes in
SetCapture .hwnd
.forecolor = .backcolor
.backcolor=rgb(255,100,0)
End If
End If
End With
End Sub
Now just change this code to use other controls !!
Re: HELP: Mouseover in VB5
Author: Daniel Hardman
Date: Tue, 27 Jan 1998 00:00
Date: Tue, 27 Jan 1998 00:00
9 lines
1489 bytes
1489 bytes
There's a "hot-tracking" VB5 sample (which I think is what you're after) on the microsoft web site: http://premium.microsoft.com/vbasic/browse.asp You'll have to register for MSDN online before you can see it. --Daniel Hardman
Re: HELP: Mouseover in VB5
Author: shroom
Date: Wed, 28 Jan 1998 00:00
Date: Wed, 28 Jan 1998 00:00
21 lines
1877 bytes
1877 bytes
Yeah, or you could simplify your life and use the built in MouseMove event, inherent in pretty much every control. Daniel Hardman wrote: > There's a "hot-tracking" VB5 sample (which I think is what you're after) on > the microsoft web site: > > http://premium.microsoft.com/vbasic/browse.asp > > You'll have to register for MSDN online before you can see it. > > --Daniel Hardman -- New!! Just in time for Christmas from Mattel: The Schindler's List E-Z-Bake Action Figures (lightbulb not included).
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads