Public Class Form1 Inherits System.Windows.Forms.Form Declare Function ShowWindow Lib "user32" (ByVal hWnd As System.IntPtr, ByVal nCmdShow As Integer) As Boolean Private Const SW_MINIMIZE As Integer = 6 Private Const SW_MAXIMIZE As Integer = 3 Private Const SW_RESTORE As Integer = 9 Declare Function SetParent Lib "user32" (ByVal hWndChild As System.IntPtr, ByVal hWndNewParent As System.IntPtr) As System.IntPtr #Region " Windows Form Designer generated code " Private Sub wordMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordMenu.Click Dim pinfo As New ProcessStartInfo("WINWORD") Dim p As Process = System.Diagnostics.Process.Start(pinfo) p.WaitForInputIdle() SetParent(p.MainWindowHandle, Label1.Handle) End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)