Click here to Skip to main content
15,889,861 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi I succeed to finish my code of simple viewer PC screen. Work with WP7
See the video
http://www.youtube.com/watch?v=cCwsuj7Hcno[^]
Now I will go to try how control the mouse?
About my app I use socket to connect to the server, no RDP protocol and its word good. I try it on different machines and networks (@IP) and work perfect.

My app is a last year project so any idea about how to control the cursor.
Posted
Updated 27-Feb-12 0:06am
v3
Comments
Manfred Rudolf Bihy 27-Feb-12 5:57am    
See what video? Please correct the URL.
juste_3al_faza 27-Feb-12 6:08am    
Sorry it work now try it
#realJSOP 27-Feb-12 6:09am    
Ummmm, what? What does your app do?
juste_3al_faza 27-Feb-12 6:13am    
For now its show the desktop PC screen, a simple view.
But my purpose is to remote desktop, a simple one
juste_3al_faza 27-Feb-12 8:39am    
I am really confused :(
No one can help!!!!!!!!!!!!

1 solution

First, you can control cursor in System.Windows.Forms. Use this class:
http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.aspx[^].

You can also control the cursor on low-level system-wide using the P/Invoked Windows API SendInput. Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^].

If you need to learn P/Invoke, read this:
http://en.wikipedia.org/wiki/PInvoke[^],
http://msdn.microsoft.com/en-us/library/Aa712982[^].

This CodeProject article is also useful:
Essential P/Invoke[^].

However, this method is relatively easy to P/Invoke. Here this is already done for your. You only need to include this code in your C# project:
http://www.pinvoke.net/default.aspx/user32.sendinput[^].

—SA
 
Share this answer
 
Comments
juste_3al_faza 27-Feb-12 13:03pm    
Thanks a lot, that's what I need
Sergey Alexandrovich Kryukov 27-Feb-12 13:03pm    
You are very welcome.
Good luck, call again.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900