Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 'By Ahmed Salah =D
- 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
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Dim p As Process = System.Diagnostics.Process.Start("C:\Windows\notepad.exe") 'By Ahmed Salah =D
- p.WaitForInputIdle()
- SetParent(p.MainWindowHandle, Me.Handle) 'By Ahmed Salah =D
- ShowWindow(p.MainWindowHandle, SW_MAXIMIZE)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement