VB: Hide/Show a Window from a Game

10/17/2013 21:24 PantherBrothers#1
Hallo,
hab mal eine Frage:
Wie muss der Script heißen, wenn ich mit einem Programm das ich in Visual Basic erstellt habe, ein Fenster (Form) einer anderen Anwendung Hidden & wieder anzeigen lassen will?
Als Beispiel: Hab das S4 League Fenster geöffnet und will mit dem Programm das Fenster verschwinden (also das es nur in der Taskleiste angezeigt wird) lassen und es wieder mit dem Programm anzeigen lassen.

English Version:
How have to be the Script when I have created a program with Visual Basic, that can Hide/Show the Window from a game.
For Example: I have the S4 Legue Window and I will Hide the Window with my Programm that I have created and also Show it?
10/17/2013 21:31 berkay2578#2
Code:
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean

Private Sub EditProcess(ByVal ProcessName as String, ByVal Mode as Integer)
	For Each p As Process In Process.GetProcessesByName(ProcessName)
		ShowWindow(p.MainWindowHandle, Mode)
	Next
End Sub

'EditProcess("S4Client", 6) 
'exe name without the .exe 
'6 -> send minimize request
'11 -> force minimize
'5 -> show window
'9 -> restore window