Click here to Skip to main content
15,915,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was wondering if it is possible to move other programs around on the screen for example, i click a button in my program and it will move skype the top right of the screen and lets say its at pos(x- 100, Y - 50)?

If this is possible to do please give me information on how to do it or something, because Im really sick of my game always moving to the centre of my screen.
Posted

1 solution

It is possible some information on how to do this, am explain in the basis of VC++ but I believe you can achieve the same in C#.

Capture the Window Handle of your application by window Id or by searching DesktopWindows
Using the Handle call the SetWindowPos to move your window

some examples
using-setwindowpos-in-c-sharp-to-move-windows-around[^]
 
Share this answer
 
Comments
[no name] 13-Jan-13 4:20am    
i have the code it works great, I was just wondering if i can do this with just 1 process?
Jibesh 13-Jan-13 4:23am    
Thats nice. but what do you mean by just 1 process?
[no name] 13-Jan-13 4:28am    
Well right now the code is made so that it will move all programs running to that position, i just want it to happen to 1 program, and that is the leagueoflenges.exe
Andreas Gieriet 13-Jan-13 9:47am    
Please!
If you follow that link above and if you then follow-up by checking google for c# process class mainwindowhandle, you will find how to use it.
If you don't know how to search for a process in C#, ask google C# find process by name.
Andi

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