msg over mouse icon

E

e.mel

Nicodemus said:
Hi all,

is there a way to get a msgbox poping up when moving the mouse icon over a
control (image, button,...). I could display a textbox, but I wish the msgbox
to follow the mouse icon.
Pls check here for example :
http://www.futura-sciences.com/news-accoona-moteur-recherche-dope-intelligence-artificielle_9387.php
Moving the mouse over the hyperlinks to see the msg.

Thank you all for any help.
Nicodemus

this can be done in fundementally the same way in access. Make a label
put in you text and give it a different background color. then in the
control you want it to appear on add this to the MouseMove event

Private Sub Command0_MouseMove(Button As Integer, Shift As Integer, X
As Single, Y As Single)
Label1.Top = Y + Command0.Top + 350
Label1.Left = X + Command0.Left
End Sub


its a start, but the label stays below other controls, I dont know what
event to use to trigger it to dissappear, and you would need a bunch of
labels if you wanted parts of the box to be formatted differently
(bold, underline, colored, etc)
 
N

Nicodemus

That's what I already did, but I find it no smoothly enough !
Actually, what I do is when I move the mouse over a customer's name, I
display its details in a label (address,...)
I thought there could be something more technical, like what you saw on the
website. Could it have something to do with new features provided by 'dot
net', or something ? I'm not aware at all about this language...
 
E

e.mel

e.mel said:
this can be done in fundementally the same way in access. Make a label
put in you text and give it a different background color. then in the
control you want it to appear on add this to the MouseMove event

Private Sub Command0_MouseMove(Button As Integer, Shift As Integer, X
As Single, Y As Single)
Label1.Top = Y + Command0.Top + 350
Label1.Left = X + Command0.Left
End Sub


its a start, but the label stays below other controls, I dont know what
event to use to trigger it to dissappear, and you would need a bunch of
labels if you wanted parts of the box to be formatted differently
(bold, underline, colored, etc)


I've giving it a little more thought and
- details_MouseMove event works great for dissappearing the box
(.visible = false).
- an image works fine instead of a text box, so text can be formatted
anyway you want
- clicking format->bring to front will draw the box over other
controls, but still not the control the box iss attached to
- gives an error if the box is too big for the details section fix:
Label1.Top = IIf((Y + Command0.Top + 350) > (Detail.Height -
Label1.Height), (Detail.Height - Label1.Height), (Y + Command0.Top +
350))
'didnt find a max() function in VBA
 
E

e.mel

adding:
If lastX = X And lastY = Y Then Exit Sub
lastX = X
lastY = Y
where lastX, lastY are global variables (or at least module) cuts down
on the flickering, the function runs continuously when the mouse is
over the control, whether the mouse moves or not, this works as a short
curcuit when the mouse hasnt moved.
 
E

e.mel

also
make sure your not running any more code than you need, it doesnt need
to look up the customer's address and load that into the controls
everytime the mouse moves, only when the customer changes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top