Link to home
Start Free TrialLog in
Avatar of YetAnotherCoder
YetAnotherCoder

asked on

MOUSE MOVE FAILS ON A USER CONTROL HOSTED INSIDE INTERNET EXPLORER

I have a user control, say UC, with splitter control that divides the form like |--.
The right bottom portion loads controls based on the user selections on the left side.

I have attached a Application.AddMessageFilter that captures the MOUSEMOVE messages in UC constructor.

While the user is acitve on UC my application keeps renewing logout time.
If the mouse stops moving on UC then it logs the user out after 30 secs of inactivity...

When I host the above user control UC inside a Win Form everything works fine. But when I host the same UC inside an internet explorer using OBJECT tag, MOUSEMOVE is not working correctly:: Eventhough I am moving the mouse, it fails to renew the user logout time but instead acts like it is not seeing the MOUSEMOVE events...and simply logs out the user.

HOW TO FIX this??

Thanks

James
Avatar of John Claes
John Claes
Flag of Belgium image

James.

because everything is done at the codebehind the WinForm will work correcly because OnMouseMove will call the presenter (codebehind) and the mouse move is "seen" and "processed"

because in an ASP the CodeBehind is ServerSide and so for every CodeBehind Execution an Server-Call must be done.
On every mouse move you should then send the call towards the server and this will issue a real hugh bunch off calls.
That's why the MOUSEMOVE is not working linked to CodeBehind Calls

Poor beggar.
Avatar of YetAnotherCoder
YetAnotherCoder

ASKER

Hi Poor beggar,

What is the best way to get it working then. Is there a JavaScript alternative that I can use when the mouse is over user control, UC, and call the control function via the java script. How effective will it be? Atleast it will handled locally and not at the server?
ASKER CERTIFIED SOLUTION
Avatar of John Claes
John Claes
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi poor beggar,

As I have another discussion on another thread
https://www.experts-exchange.com/questions/27032008/MouseMove-event-does-not-fire-after-a-dialog-is-displayed-on-the-user-control.html
I have tried using JavaScript OnMouseMove event on a DIV tag to call the function inside the user control. It works until I display a popup dialog originated inside the control. Once the dialog is displayed and closed, the OnMouseMove event does not work anymore until the mouse is taken off of the control and bring it back OR until a right click on the control. How to avoid moving mouse out of the control or right click and make it work??

Thanks for any ideas... You can add to that thread...
I've done that.
is this question closed?