954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mouse over

i am currently using the following code so that when the cursor is over an object, it displays a description.

Private Sub txtSearchbox_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    frmeObjectDescription.Visible = True
    lblSearchCriteria.Visible = True
End Sub


however, i dont know how to make it so that if the mouse exits the vicinity of the object, then it invokes another description. ie, when it goes from txtsearchbox to the main body of the form.

skalra63
Light Poster
30 posts since Feb 2006
Reputation Points: 13
Solved Threads: 0
 

I dunno why you can't set the tooltiptext property, but what you do is set the value BACK or to whatever it was previously, in the mouse_move event of the form. For example, I built a program that has "hyperlinks" on a tab control. All it is, is a blue label with the mouse move, mouse down, mouse up and click events set to different things. In the form's mouse_move, I just have it set all the labels back to their original color and what not.... you can do the same for your super-tooltip.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

i could use tool tips. but i dont like it for big sections of text. the way im doing it, will display what the object is and what they can do with it. i tested with the tool tips, and i found that it was easier to read. besides, tool tips seem to disappear after a few moments anyway.

so is it form_mousemove?

i tried using the form name. maybe thats why id didnt work. i previously had it on another form. but didnt need to mouse over the form area, because all the buttons were nested in a frame.


edit: tried it on form_mouseMove. it works perfectly. thanks.

skalra63
Light Poster
30 posts since Feb 2006
Reputation Points: 13
Solved Threads: 0
 

Yes, Form_MouseMove, when I double click the form, I change the combobox on the top left to mouse_move, the declaration is:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

End Sub


and here is where I went:

Attachments vb.JPG 41.84KB
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

and then whats next to do?
I want to know how to use mouse to move a picture in the form
is there any example can you give to help this problem?

josephbeluan
Newbie Poster
13 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

@Josephbeluan, you should know that hijacking of others threads is not allowed. You need to open your own thread and post your question there. Click Here to open your OWN thread.

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You