le_handle = System.Diagnostics.Process.Start("....chemin de son exe ...")
MoveWindow(le_handle, -1000, -1000, 100, 100, True)
Imports System.Runtime.InteropServices Imports System.Threading Public Class Form1 <DllImport("user32.dll")> _ Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal uFlags As Integer) As Boolean End Function <DllImport("user32.dll")> _ Shared Function SetWindowText(ByVal hwnd As IntPtr, ByVal windowName As String) As Boolean End Function 'http://codes-sources.commentcamarche.net/forum/affich-10041058-lancer-un-exe-et-le-redimensionner#11 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim process As New Process() process.StartInfo.FileName = "notepad.exe" process.Start() Thread.Sleep(100) SetWindowPos(process.MainWindowHandle, IntPtr.Zero, 0, 0, 300, 200, 0) End Sub ' https://msdn.microsoft.com/fr-fr/library/system.diagnostics.processstartinfo.arguments(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Dim startInfo As ProcessStartInfo = New ProcessStartInfo("notepad.exe") startInfo.WindowStyle = ProcessWindowStyle.Hidden Process.Start(startInfo) End Sub ' https://openclassrooms.com/forum/sujet/vb-net-tuer-un-processus-68572 Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click Dim myProcesses As Process() = Process.GetProcessesByName("notepad") Dim myProcess As Process For Each myProcess In myProcesses myProcess.Kill() Next myProcess End Sub End Class