By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

mousemove/mouseenter/etc problems

P: n/a
i posted this a while ago and never got a response, but i'm still having
problems, so i thought i'd see if anyone had any sudden realizations this
time
Thanks in advance!

Tim
I have written some code that causes mouseover effects on a picture box.
The code works fine most of the time and creates some really nice effects.

HOWEVER,
If i try, i can get the effects to not disappear (as if the MouseLeave event
isn't firing) or i can get the effects to not appear in the first place (as
if the MouseEnter/MouseMove events aren't firing).
More or less i can do this by just moving the mouse slowly into the
picturebox and slowly out of the picturebox.
I'm just handling this events and, in two or three lines of code, setting
properties of the picturebox.
Is there something else i need to be doing?

Thanks,
Tim

P.S. I've written code to handle the MouseMove event for the form the
picturebox is contained in, and this seems to mostly fix the problem of the
MouseLeave event not firing, but thats kinda a hack, not a true fix. And it
doesn't fix the other problem either.
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If that's just two or three lines of code why don't you post it here. Doing
so may help....

"Tim Mulholland" <ti*@eyeresponse.com> wrote in message
news:uj**************@TK2MSFTNGP10.phx.gbl...
i posted this a while ago and never got a response, but i'm still having
problems, so i thought i'd see if anyone had any sudden realizations this
time
Thanks in advance!

Tim
I have written some code that causes mouseover effects on a picture box.
The code works fine most of the time and creates some really nice effects.

HOWEVER,
If i try, i can get the effects to not disappear (as if the MouseLeave event isn't firing) or i can get the effects to not appear in the first place (as if the MouseEnter/MouseMove events aren't firing).
More or less i can do this by just moving the mouse slowly into the
picturebox and slowly out of the picturebox.
I'm just handling this events and, in two or three lines of code, setting
properties of the picturebox.
Is there something else i need to be doing?

Thanks,
Tim

P.S. I've written code to handle the MouseMove event for the form the
picturebox is contained in, and this seems to mostly fix the problem of the MouseLeave event not firing, but thats kinda a hack, not a true fix. And it doesn't fix the other problem either.

Nov 15 '05 #2

P: n/a
Tim,

Maybe forcing a refresh/redraw of the pictureBox via Update() will do the
trick. If you are not sure if your event is fired, try setting a breakpoint
in the event handler (or add a Message.Show("Inside MouseLeave") to your
handler code).

Good Luck,
Stephan

"Tim Mulholland" <ti*@eyeresponse.com> wrote in message
news:uj**************@TK2MSFTNGP10.phx.gbl...
i posted this a while ago and never got a response, but i'm still having
problems, so i thought i'd see if anyone had any sudden realizations this
time
Thanks in advance!

Tim
I have written some code that causes mouseover effects on a picture box.
The code works fine most of the time and creates some really nice effects.

HOWEVER,
If i try, i can get the effects to not disappear (as if the MouseLeave event isn't firing) or i can get the effects to not appear in the first place (as if the MouseEnter/MouseMove events aren't firing).
More or less i can do this by just moving the mouse slowly into the
picturebox and slowly out of the picturebox.
I'm just handling this events and, in two or three lines of code, setting
properties of the picturebox.
Is there something else i need to be doing?

Thanks,
Tim

P.S. I've written code to handle the MouseMove event for the form the
picturebox is contained in, and this seems to mostly fix the problem of the MouseLeave event not firing, but thats kinda a hack, not a true fix. And it doesn't fix the other problem either.

Nov 15 '05 #3

P: n/a
I'm positive that the events are NOT firing if i try to "trick" it.
If i just move the mouse slowly off the object (or sometimes if i do it
quickly), the MouseLeave event is never fired.
So i'm having to catch the MouseEnter/MouseMove events of the objects
surrounding my pictureboxes and forcing a clear of the picture box.
It just seems like i should have to do that.
Unless someone comes up with something by the morning, i'll post some code
so yall can test what i'm talking about.
Thanks for your help so far people, i appreciate it.

Tim

"Stephan Kabisius" <ka******@yahoo.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
Sorry, that was supposed to be 'MessageBox.Show("Inside MouseLeave")'.

Stephan

"Stephan Kabisius" <ka******@yahoo.com> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
Tim,

Maybe forcing a refresh/redraw of the pictureBox via Update() will do the
trick. If you are not sure if your event is fired, try setting a

breakpoint
in the event handler (or add a Message.Show("Inside MouseLeave") to your
handler code).

Good Luck,
Stephan

"Tim Mulholland" <ti*@eyeresponse.com> wrote in message
news:uj**************@TK2MSFTNGP10.phx.gbl...
i posted this a while ago and never got a response, but i'm still having problems, so i thought i'd see if anyone had any sudden realizations this time
Thanks in advance!

Tim
I have written some code that causes mouseover effects on a picture box. The code works fine most of the time and creates some really nice effects.
HOWEVER,
If i try, i can get the effects to not disappear (as if the MouseLeave

event
isn't firing) or i can get the effects to not appear in the first
place (as
if the MouseEnter/MouseMove events aren't firing).
More or less i can do this by just moving the mouse slowly into the
picturebox and slowly out of the picturebox.
I'm just handling this events and, in two or three lines of code, setting properties of the picturebox.
Is there something else i need to be doing?

Thanks,
Tim

P.S. I've written code to handle the MouseMove event for the form the
picturebox is contained in, and this seems to mostly fix the problem

of the
MouseLeave event not firing, but thats kinda a hack, not a true fix.
And it
doesn't fix the other problem either.



Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.