<DllImport("user32.dll")> _ Public Function MoveWindow(ByVal hWnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Boolean) As Boolean End Function Public Sub NoveNotepad() Dim ApplicationProcess = System.Diagnostics.Process.Start("Notepad.exe") ApplicationProcess.WaitForInputIdle() Dim ApplicationHandle = ApplicationProcess.MainWindowHandle Dim z = MoveWindow(ApplicationHandle, 600, 600, 600, 600, True) ' THIS RETURNS TRUE End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)