Click here to Skip to main content
13,086,248 members (82,840 online)
Rate this:
Please Sign up or sign in to vote.
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 12-Jan-13 19:03pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
TechXSoftware 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?
TechXSoftware 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
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100