cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009
-
3 nov. 2004 à 15:23
cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009
-
3 nov. 2004 à 18:20
Bonjour tlm alors voila mon pb est comme il est marquer dans le titre! Je voudrer simuler un click et un double click de souri !! g chercher sur google sur vbfrance sans gran succés :sad) je me retourne donc ver vou en esperan que qq un poura méclairer !!! :) je vou remerci davance et bonne prog ;)
thierrydelepine
Messages postés521Date d'inscriptionmardi 24 décembre 2002StatutMembreDernière intervention11 septembre 20086 3 nov. 2004 à 15:39
met ca dans un form
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009 3 nov. 2004 à 15:49
lu merci davoir repondu si vite !! mais heu alor bah g modif un pe ton code pk cher moi il me méter une erreur et g po compri se qu'il fesai exactement tu ma di il valide une msgbox ok mai bon qd je le demarre ya po de msgbox qui apparai et jen est fai aparaitre une : (msgbox "aa",vbyesno) mai il ne ma rien fai! tu pourer po faire plu simplement qd par exempl japui sur la touche "a" du clavier la souri double clique a lendroi ou elle est par exemple je la met sur un icon japui sur a et op ca demare l'aplication ;) merci qd mm pour se que tu a fai la :) !!
Vous n’avez pas trouvé la réponse que vous recherchez ?
thierrydelepine
Messages postés521Date d'inscriptionmardi 24 décembre 2002StatutMembreDernière intervention11 septembre 20086 3 nov. 2004 à 15:53
il faut que tu te serve de deux projets dans l'un tu fais apparaitre ta msgbox puis tu lance l'autre projet qui va valider la msgbox du premier projet.
si tu met tout dans un seul projet il ne faut pas oublier que une msgbox est bloquante pour ton programme c'est a dire que tant que tu n'as pas validé la msgbox ton code ne continu pas.
thierrydelepine
Messages postés521Date d'inscriptionmardi 24 décembre 2002StatutMembreDernière intervention11 septembre 20086 3 nov. 2004 à 15:56
pour cliquer a l'endroit ou ta souris est :
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MIDDLEDOWN = &H20
Const MOUSEEVENTF_MIDDLEUP = &H40
Const MOUSEEVENTF_MOVE = &H1
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Private Sub Form_Activate()
Do
'simule un clic de souris a l'endroit ou est la souris
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, cButt, dwEI
DoEvents
Loop
End Sub
cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009 3 nov. 2004 à 16:21
Ca marche po :sad) regarde g mi un timer pour retarder le clique mai ca clique po :sad)
t sur que ca marcher cher toi ?
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MIDDLEDOWN = &H20
Const MOUSEEVENTF_MIDDLEUP = &H40
Const MOUSEEVENTF_MOVE = &H1
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Dim nbtour As String
Private Sub Form_Load()
nbtour = 0
End Sub
Private Sub Timer1_Timer()
nbtour = nbtour + 1
If nbtour = 4 Then
mouse_event MOUSEEVENTF_LEFTUP, 0&, 0&, cButt, dwEI
DoEvents
nbtour = 0
End If
End Sub
cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009 3 nov. 2004 à 16:26
escuse moi escuse moi ca marche tre bien ;) JE TE REMERCI C JUSTE QU EJAVER OUBLIER : OUSEEVENTF_LEFTDOWN Or donc enfet on fai ca :
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MIDDLEDOWN = &H20
Const MOUSEEVENTF_MIDDLEUP = &H40
Const MOUSEEVENTF_MOVE = &H1
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Dim nbtour As String
Private Sub Form_Load()
nbtour = 0
End Sub
Private Sub Timer1_Timer()
nbtour = nbtour + 1
If nbtour = 4 Then
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, cButt, dwEI
DoEvents
nbtour = 0
End If
End Sub
ET CA MARCHE NIQUEL TRO MERCI et bonne continuation ;)