![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Track Mouse Movement when the cursor is off screen?
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 |
|
|||
|
Re: Track Mouse Movement when the cursor is off screen?
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. There is no concept of movement outside the workspace area. This also requires that the "machine" is moving the physical mouse, meaning the user can't use it. If it isn't moving the physical mouse, why does it touch the cursor position? -- Dean Earley (dean.earley@icode.co.uk) i-Catcher Development Team iCode Systems |
|
|||
|
Re: Track Mouse Movement when the cursor is off screen?
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 > |
|
|||
|
Re: Track Mouse Movement when the cursor is off screen?
mike wrote:
> 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. Move it to the other side when it gets to an edge? -- Dean Earley (dean.earley@icode.co.uk) i-Catcher Development Team iCode Systems |
|
|||
|
Re: Track Mouse Movement when the cursor is off screen?
Dean Earley wrote:
> mike wrote: >> 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. > > Move it to the other side when it gets to an edge? > Thanks for the suggestion, but that's not what I came here to ask. Opportunities to KLUDGE the system abound. What I asked was how to get raw mouse input in VB6 so the application could act just like a REAL windows application. mike |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|