Ci sono diversi metodi per farlo, ma avrai bisogno di fare riferimento diretto ad alcune librerie API, ad esempio in questo modo :
> Dichiarazioni API necessarie :
Codice:
Private Const WM_SYSCOMMAND As Integer = 274
Private Const SC_MAXIMIZE As Integer = 61488
Private Declare Auto Function SetParent Lib "user32.dll" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Private 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
> Apertura Word in Form :
Codice:
Dim P As Process = Process.Start("winword.exe")
P.WaitForInputIdle()
SetParent(P.MainWindowHandle, Me.Handle)
SendMessage(P.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)