I've tried to do this code below that runs on form load:
The program has a splash form, and when the form disappears, the program opens outside of the program, but the splash form loads inside the application, can anyone help? This is a problem and I need to finish it soon.
Declare Auto Function SetParent Lib "user32.dll" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Const WM_SYSCOMMAND As Integer = 274
Private Const SC_MAXIMIZE As Integer = 61488
Dim proc As Process
Private Sub LessonMap_Load(sender As Object, e As EventArgs) Handles MyBase.Load
proc = Process.Start("C:\Program Files (x86)\CoreUIPtest\Launcher.exe")
proc.WaitForInputIdle()
SetParent(proc.MainWindowHandle, Panel1.Handle)
SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
End Sub
The program has a splash form, and when the form disappears, the program opens outside of the program, but the splash form loads inside the application, can anyone help? This is a problem and I need to finish it soon.