Results 1 to 4 of 4

Thread: One Mouse One Keyboard Control 2 PC

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    31

    One Mouse One Keyboard Control 2 PC

    Hello, I try to write this program. This program will send mouse x y to other PC .I use mouse_event API and SetCursorPos to move cursor but I have a problem

    mouse_event is very slowly
    SetCursorPos is not smooth

    Please help me to fix that problem.

    Thank you

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: One Mouse One Keyboard Control 2 PC

    Don't use events. Make a timer to check the mouse position every 100ms or so and update the other computer. It's going to be faster than log-jamming with millions of unneeded mouse_events.

    It's not going to be the smoothest thing. No remote-control program is. You have two options: You can make it happen in real-time and be slightly choppy, or buffer it, which makes a delay, but it'll be much smoother.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    31

    Re: One Mouse One Keyboard Control 2 PC

    Thank you

  4. #4
    Hyperactive Member syntaxeater's Avatar
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    460

    Re: One Mouse One Keyboard Control 2 PC

    Just a note: If the two computers are in the same room, you could use a wireless keyboard/mouse and sync it with a receiver on both PCs. The mouse's position might not be identical right away, but moving it to the corner would take care of that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width