ich suche nach einer Möglichkeit eine Anwendung z:b. WORSD mittels Sendkeys zu minimieren
hat jemand einen Tipp
mfg
reiner
Code:
[Cc]
Option Explicit
Private Declare PtrSafe Function GetForegroundWindow Lib "user32" () As LongPtr
Private Declare PtrSafe Function ShowWindow Lib "user32" ( _
ByVal hwnd As LongPtr, ByVal nCmdShow As Long) As Long
Private Const SW_MAXIMIZE = 3
Private Const SW_MINIMIZE = 6
Sub MinimiereAnwendung()
ShowWindow GetForegroundWindow, SW_MINIMIZE
End Sub
Code:
[Cc]
Option Explicit
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function ShowWindow Lib "user32" ( _
ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_MAXIMIZE = 3
Private Const SW_MINIMIZE = 6
Sub MinimiereAnwendung()
ShowWindow GetForegroundWindow, SW_MINIMIZE
End Sub