home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,626 of 10,840   
   mike to Dean Earley   
   Re: Track Mouse Movement when the cursor   
   12 Aug 08 21:20:12   
   
   From: spamme9@gmail.com   
      
   Dean Earley wrote:   
   > mike wrote:   
   >> I have the opportunity to rescue a project that   
   >> uses a mouse to sense the relative position of a machine.   
   >> The hardware is built...just needs to be programmed.   
   >> Stop snickering!!! I didn't do it...I just gotta fix it.   
   >>   
   >> I need to make some calculations on the measurements   
   >> and  VB6 is my language.   
   >>   
   >> Yes, the system mouse will corrupt the measurement,   
   >> but it's an auditing function and that's acceptable.   
   >>   
   >> Everything I've tried so far requires resetting the   
   >> mouse cursor to a known position on the screen at the   
   >> start of the machine cycle.  That sorta works, but   
   >> makes it impossible for the system mouse to take control   
   >> long enough to operate the computer.   
   >>   
   >> I need to get rid of the cursor position reset and just   
   >> monitor the movement of the mouse...NOT the position of   
   >> the cursor on the screen.   
   >>   
   >> The obvious stuff in the API looks at cursor position.   
   >> I need mouse movement.   
   >>   
   >> Is there some function that can be inquired   
   >> to determine mouse movement since the last query even when   
   >> the mouse cursor is stuck on the edge of the screen?   
   >>   
   >> Thanks, mike   
   >   
   > Not without disabling the mouse entirely and reading the data directly.   
   I don't have a problem with this.  What I'd like to do is keep the   
   system mouse active and have this second mouse disconnected from the   
   cursor and used for program input only.   
   There's a whole set of rawinput functions, I just can't figure out how   
   to use them.   
   They're in the SDK, but I can't get the SDK to install on my XP system   
   with visual studio 6.  See my other posting on this subject.   
   All the examples are in C++.  I have not discovered a function prototype   
   that I could use in VB6.   
      
   I've found a bunch of questions on the web about rawinput, but no answers   
   beyond what MS publishes...and there's argument that even that doesn't   
   work...as published.   
      
      
   I did install visual studio 2008.  The SDK is there, but I still don't   
   know how to use them in Visual Basic.  Everything I've done in the past   
   had a function prototype that I could cut/paste from the API viewer.   
   And I'd really, really like to avoid the learning curve of dotnet and C++ If   
   I can do it in vb6.   
      
      
   > There is no concept of movement outside the workspace area.   
      
   There's a program on sourceforge called "synergy".  It senses when the   
   cursor passes the edge of the screen and moves it onto the screen of   
   another computer on your network.  So, Somebody has a concept of what it   
   means to move outside the (local)workspace area. The source code is   
   available, but since I don't understand the nuances of C++   
   syntax, I can't easily figure out how it works.  It's rather complex   
   with all that network stuff built-in.   
      
   > This also requires that the "machine" is moving the physical mouse,   
   > meaning the user can't use it.   
      
   Two mice.  Current mouse driver attaches both mice to the same cursor.   
   There's a cpnmouse driver that gives you two cursors, but the main mouse   
   cursor attaches itself to whichever cursor goes with the mouse you're   
   currently using.  That doesn't solve my problem.  There's an API that   
   goes with it.  I might be able to use it if I could figure out how   
   to access it in VB6.   
   >   
   > If it isn't moving the physical mouse, why does it touch the cursor   
   > position?   
   Again, two mice.  Windows, by default, attaches both mice to the same   
   cursor.   
   I want to get relative moves out of the machine mouse, which happens   
   to be a wireless usb mouse,  without affecting   
   the system cursor attached to the system mouse.   
      
   A temporary solution would instruct the user not to touch the system   
   mouse and let the program monitor the system cursor.  Problem is that   
   if the cursor tries to move outside the screen area, everything grinds   
   to a halt.  If I could still get position data with the cursor mashed   
   up against the edge of the screen...that would be a temporary kludge.   
   But monitoring cursor position won't do it.  I'd have to monitor mouse   
   moves...which seems to lead me right back to rawinput.   
      
   mike   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca