Information générale
Catégorie:
Codage, syntaxe et commandes
for activate window try this code:
Public Declare Function SetFocusAPI Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
Public Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Declare Function IsIconic Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetActiveWindow Lib "user32" (ByVal hwnd As Long) As Long
Public Function MakeWindowActive(ByVal hwnd As Long)
On Error Resume Next
Dim res As Long
res = SetActiveWindow(hwnd)
res = SetFocusAPI(hwnd)
If IsIconic(hwnd) Then res = ShowWindow(hwnd, 9)
res = SetForegroundWindow(hwnd)
End Function
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement