ERFORDERLICHE OBJEKTE
2 CommandButtons (Command1, Command2)
FORM-CODE
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Const Fenstertitel = "Rechner"
Private Sub Command1_Click()
wHandle = FindWindow(vbNullString, Fenstertitel)
lResult = ShowWindow(wHandle, SW_HIDE)
End Sub
Private Sub Command2_Click()
wHandle = FindWindow(vbNullString, Fenstertitel)
lResult = ShowWindow(wHandle, SW_SHOW)
End Sub
Private Sub Form_Load()
Command1.Caption = "Ausblenden"
Command2.Caption = "Einblenden"
Shell "calc.exe", vbNormalFocus
End Sub
|