Public Class frmOpenPlugin Public PluginName As String Private Sub frmOpenPlugin_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim myProcess As Process = New Process() Dim MyHandle As IntPtr myProcess.StartInfo.FileName = "E:\Software-Projekte\EDOKA\client\EDOKA_Erweiterungen\bin\Debug\EDOKA_Erweiterungen.exe" myProcess.StartInfo.Arguments = "/Plugin=" + PluginName + " /MA=" + Globals.MitarbeiterNr.ToString myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized myProcess.Start() 'MyHandle = Win32API.FindWindow(vbNullString, "EDOKA_Erweiterungen.exe") 'Dim dt As DateTime = Now 'While Now < dt.AddSeconds(1) ' Application.DoEvents() 'End While 'myProcess.WaitForInputIdle() 'Win32API.SetParent(myProcess.MainWindowHandle, Me.Handle) 'myProcess.WaitForInputIdle() 'Win32API.ShowWindow(myProcess.MainWindowHandle, Win32API.SW_Maximize) 'While Now < dt.AddSeconds(1) ' Application.DoEvents() 'End While 'Dim rect As New Rectangle 'Win32API.GetWindowRect(myProcess.MainWindowHandle, rect) 'While Now < dt.AddSeconds(1) ' Application.DoEvents() 'End While 'Me.Width = rect.Width + rect.X 'Me.Height = rect.Height + rect.Y End Sub End Class