daddam
Messages postés6Date d'inscriptiondimanche 1 avril 2001StatutMembreDernière intervention23 mars 2006
-
17 avril 2003 à 09:50
BasicInstinct
Messages postés1470Date d'inscriptionmardi 5 février 2002StatutMembreDernière intervention20 octobre 2014
-
17 avril 2003 à 10:13
Bonjour,
Je cherche comment faire pour basculer vers un programme déja lancé et le mettre en premier plan.
BasicInstinct
Messages postés1470Date d'inscriptionmardi 5 février 2002StatutMembreDernière intervention20 octobre 201412 17 avril 2003 à 10:13
faut recuperer son handle (api findwindow)
puis passer la fenetre au 1er plan (api setforegroundwindow)
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net
Dim lHandle As Long
'First we're going to retrieve the handle of this window
' "ThunderRT5Form" is the classname of a VB-window
lHandle = FindWindow("ThunderRT5Form", Me.Caption)
'Set this window to the foreground
lHandle = SetForegroundWindow(lHandle)
End Sub