Minimize, Maximize, Gizleme ve Eski Haline Döndürmek İçin öncelikle belirtilenler Global olarak tanımlanmalı:


'Global Olarak Tanımlanmalı
Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer
Const SW_HIDE As Integer = 0
Const SW_RESTORE As Integer = 1
Const SW_MINIMIZE As Integer = 2
Const SW_MAXIMIZE As Integer = 3




Minimize olarak Uygulama başlatma:


Dim prcs As New ProcessStartInfo("notepad.exe")
prcs.WindowStyle = ProcessWindowStyle.Minimized
Process.Start(prcs)


Eğer yukarıdaki kod alta alınmış olarak başlatmıyorsa alttaki kodlar ile işlemi takip edip açıldığında anında küçültebilir veya gizleyebilirsiniz.



Varolan Uygulamayı Process'e göre alta alma(Minimize):



'Button Click Eventi:

For Each p As Process In Process.GetProcesses
If String.Compare(p.ProcessName, "notepad", True) = 0 Then
Dim hWnd As Integer = CType(p.MainWindowHandle, Integer)
ShowWindow(hWnd, SW_MINIMIZE)

End If
Next





Varolan Uygulamayı Process'e göre büyütme(Maximize):



'Button Click Eventi:

For Each p As Process In Process.GetProcesses
If String.Compare(p.ProcessName, "notepad", True) = 0 Then
Dim hWnd As Integer = CType(p.MainWindowHandle, Integer)
ShowWindow(hWnd, SW_MAXIMIZE)

End If
Next





Varolan Uygulamayı Process'e göre gizleme(Hide):



'Button Click Eventi:

For Each p As Process In Process.GetProcesses
If String.Compare(p.ProcessName, "notepad", True) = 0 Then
Dim hWnd As Integer = CType(p.MainWindowHandle, Integer)
ShowWindow(hWnd, SW_HIDE)

End If
Next




Kolay gelsin.