[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

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
0
YetAnotherCoder
Asked:
YetAnotherCoder
  • 3
  • 2
1 Solution
 
John ClaesCommented:
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.
0
 
YetAnotherCoderAuthor Commented:
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?
0
 
John ClaesCommented:
you can indeed use the Javascripts to catch the mouse moves.
Everything will be kept Client Side. because JavaScript runs clientside.

But when needed you can call a action on the screen that will fire a PostBack handling towards the server.

poor beggar
0
 
YetAnotherCoderAuthor Commented:
Hi poor beggar,

As I have another discussion on another thread
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_27032008.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...
0
 
John ClaesCommented:
I've done that.
is this question closed?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now