Files
EDOKA_DMS/EDOKA/Plugin/frmPluginWindow.vb
2022-12-25 10:09:49 +01:00

31 lines
1.2 KiB
VB.net

Public Class frmPluginWindow
Private Sub frmPluginWindow_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Public Sub Get_Plugins()
Dim myProcess As Process = New Process()
Dim MyHandle As IntPtr
'myProcess.StartInfo.FileName = "notepad.exe"
myProcess.StartInfo.FileName = "E:\Software-Projekte\EDOKA\client\EDOKA_Erweiterungen\bin\Debug\EDOKA_Erweiterungen.exe"
myProcess.StartInfo.Arguments = Me.ParentForm.Handle
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized
myProcess.Start()
'MyHandle = Win32API.FindWindow(vbNullString, "notepad.exe")
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, 3)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
End Sub
End Class