Cjvg
Messages postés330Date d'inscriptionmercredi 6 décembre 2000StatutMembreDernière intervention26 octobre 2017 9 oct. 2008 à 19:20
Voilà la solution:
'* Pour tester l'activité d'un Processus --------------------------------
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_NOSIZE = &H1
'------------------------------------------------------------------------
' On demande de positionner le Processus
'------------------------------------------------------------------------
Private Sub Command1_click()
Dim Jleft As Integer
Dim Jtop As Integer
Jleft = 10000 / Screen.TwipsPerPixelX
Jtop = 5000 / Screen.TwipsPerPixelX
Call Onpositionne("Rechercher un Dossier", Jleft, Jtop)
End Sub
'-------------------------------------------------------------------------
' On positionne le processus
'-------------------------------------------------------------------------
Function Onpositionne(Parm1 As String, Jleft As Integer, Jtop As Integer)
Dim hwnd As Long
hwnd = FindWindow(vbNullString, Parm1) '* Récupérer le HWnd d'un Projet
cs_Exploreur
Messages postés4822Date d'inscriptionlundi 11 novembre 2002StatutMembreDernière intervention15 novembre 201615 9 oct. 2008 à 16:01
Non...j'viens de voir...^^
Par contre je pense que tu pourrais le faire en récupérant le PId et le Hwnd de cette fenêtre et utiliser une autre api qui te permet de positionner cette fameuse fenêtre à l'écran, voir API : SetWindowsPos