473,383 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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
Aug 9 '08 #1
4 6935
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 (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
Aug 12 '08 #2
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
>
Aug 12 '08 #3
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 (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
Aug 13 '08 #4
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
Aug 13 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael J Whitmore | last post by:
Greetings, I have a very simple question. How do you simulate a user input to turn off a screen saver in Windows (either a mouse movement, mouse click, or keyboard input)? I promise I searched...
2
by: harrylmh | last post by:
Hi, Here's the problem. Whenever the mouse goes out of the form or any control tat handles mouse move, the mouse stop sending it's coordinates back to the program. How can I correct this? What's...
1
by: Benny Raymond | last post by:
In my attempt to make a macro recording program where i can then playback mouse movements i'm running into a big problem: I'm trying to simulate the movement of the mouse to a point on the...
3
by: garyusenet | last post by:
I have a programme written in C++, the programme is unmanaged and is an executable, i don't have any source code. I'm writing a C# program. I want to (a) start the programme minimized. (b) send...
6
by: c.k. | last post by:
I was wondering if there was a way to give mouse movement on an empty form some lag/delay? For instance, user moves mouse, and the cursor is 20ms (possible adjustable from some option) behind the...
5
by: LurkB | last post by:
Hey , I wonder how and which programming language I can use to capture movement of a mouse on Linux screen (not just on a particular webpage user is on) like how VB, C#,C++, and J# can be used to...
2
by: LurkB | last post by:
Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen (not just on a particular webpage user is on). Thanks in advance L
2
by: LurkB | last post by:
Hello, I wonder how I could monitor a mouse movement on LINUX operating system screen using C# Thanks in Advance L
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.