TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 4:09 pm




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: OnMouseMove, MouseX and MouseY relative to selected image
PostPosted: Fri Jul 22, 2011 8:19 am 
Offline

Joined: Fri Jul 22, 2011 7:13 am
Posts: 14
Hello,

I have yet to experiment with this, but the documentation is unclear... Is MouseX and MouseY relative to the currently MouseMove(index)-indexed image? Or, as I suspect I will find since the documentation doesn't cover that complexity, is MouseX and MouseY plugin-canvas relative?

If so, how can I get the mouse-hovered image-relative MouseX and MouseY?

Thanks,

Jason


Top
 Profile  
 
 Post subject: Re: OnMouseMove, MouseX and MouseY relative to selected image
PostPosted: Sun Jul 24, 2011 7:32 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi Jason,

MouseX and MouseY is used to get the X co-ordinate and Y co-ordinate of the mouse on the current image. If you want to get the corresponding X co-ordinate and Y co-ordinate values when moving the mouse on an image, you can call MouseX and MouseY in the OnMouseMove event. Below is a simple sample:

Code:
<script language="javascript">

function OnMouseMoveFunction(index) {
        document.getElementById("mousex_txt").value = frmScan.DynamicWebTwain1.MouseX;
        document.getElementById("mousey_txt").value = frmScan.DynamicWebTwain1.MouseY;
}

</script>

<script language=javascript for=DynamicWebTwain1 event=OnMouseMove(index)>
   OnMouseMoveFunction(index);
</script>

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

It is currently Sun May 20, 2012 4:09 pm


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog