Hello, lets say I have the notepad program opened in the middle of the screen what function could I use to move it so that it would be in the top left hand conner of the screen. Thank you
Printable View
Hello, lets say I have the notepad program opened in the middle of the screen what function could I use to move it so that it would be in the top left hand conner of the screen. Thank you
Are you talking about external program or your application?
Use the GetWindowRect method. Not sure what the next step would be since I don't use these APIs, but that should provide you with a start.
yes, notepad.exe as the external programQuote:
Originally Posted by Deepak Sakpal
Here you go: http://allapi.mentalis.org/apilist/S...lacement.shtml - you might also want to take a look at the related functions at the bottom there.
Thank you, this is a great start however how would I find the hWnd for the notepad.exe thats running?
vb Code:
Dim processes() As Process processes = Process.GetProcessesByName("notepad") Dim hWnd As Integer = processes(0).Handle.ToInt32