Separating the signals of a USB mouse from another USB mouse, both connected to a PC using Delphi.

Posted on 2004-11-06
Last Modified: 2010-04-05
How can I separate the signals and get different positions of 2 different USB mouse connected to a PC using Delphi.
If this is not possible, how can I separate a USB mouse and a ps/2 mouse.
Question by:sad_man
    LVL 11

    Expert Comment

    Have a look at WM_INPUT message.
    All other ways are barred because all physical mice are opened exclusively by the OS and their input is used to form the single virtual mouse of the system.
    LVL 17

    Accepted Solution

    I've tried that, connecting more than one mouse to my system. It doesn't work since Windows will merge them into one single mouse device. The same is true for additional keyboards that can be connected to the system. The system itself will never detect the keyboard that the keys came from. If you want to separate the input from both devices then you'll need a better mouse-driver that would allow a dual-mouse mode. But I've never even heard of such a thing...
    You can't even separate a serial mouse from a PS2 mouse or USB mouse... For the operating system, they all count as one single device.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now