kev900001
Messages postés119Date d'inscriptionmercredi 7 juillet 2004StatutMembreDernière intervention 9 avril 2008
-
7 avril 2006 à 17:00
cs_hmhmhm
Messages postés3Date d'inscriptiondimanche 16 mars 2003StatutMembreDernière intervention22 décembre 2007
-
22 déc. 2007 à 05:38
bonjour,
j'ai un petit probleme qui m'en pause un gros lol
voila j'ai fait un prog avec un clavier style tactil il marche avec la plupart des prog mais le souci c'est que qaund je m' en sert sur explorer pour mettre une adresse web et bien la sa me met un caractere et le deuxieme remplace le premier ainsi de suite donc ca me met qu une seul lettre donc impossible d'ecrire une adresse web complet
deuxieme soouci toujour dans le navigateur une foi une page web ouverte si je veu ecrire exemple un mot de passe sur vbfrance.com pour me connecter a mon compte et bin la sa marque rien le clavier fonctionne pas pour les champ internet des page web.
voici mon code si sa peut aider quelqu un et surtout si on peut m'aider
merci
au faite j'utilise simplement fSendKeys
bon ba meme si vous avez une source ou un code qui peu remplacer le mien ou tout autre idee ce serai super cool
Private Declare Function BringWindowToTop Lib "user32" (ByVal hWnd As Long) 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
Private Const SWP_FRAMECHANGED = &H20
Private Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Private Const SWP_HIDEWINDOW = &H80
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_NOCOPYBITS = &H100
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOOWNERZORDER = &H200
Private Const SWP_NOREDRAW = &H8
Private Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOZORDER = &H4
Private Const SWP_SHOWWINDOW = &H40
Private Const HWND_BOTTOM = 1
Private Const HWND_TOP = 0
Private Const HWND_NOTOPMOST = -2
Private Const HWND_TOPMOST = -1
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hWnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type WINDOWPLACEMENT
Length As Long
flags As Long
showCmd As Long
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_RESTORE = 9
Private PriorHwnd As Long
' Appuie sur une touche du clavier
' Les touches doivent être assemblées dans un groupe de contrôle (command1(index))
Private Sub Command1_Click(Index As Integer)
Dim WP As WINDOWPLACEMENT
Dim ShowState As Long
WP.Length = 44 'size of WINDOWPLACEMENT structure
GetWindowPlacement PriorHwnd, WP
ShowState = WP.showCmd If ShowState SW_SHOWMINIMIZED Then ShowState SW_RESTORE
If InStr(UCase(Command), "MIN") Then Me.WindowState = vbMinimized
SetForegroundWindow PriorHwnd
BringWindowToTop PriorHwnd
'ShowWindow PriorHwnd, ShowState
Select Case UCase(Command1(Index).Caption)
Case "Entrée"
fSendKeys "{ENTER}" 'pour faire un vrai clavier, d'autres macros sont définie pour fonctionner avec Sendkeys
Case "DEL"
fSendKeys "{BACKSPACE}"
Case "VERR.NUM"
fSendKeys "{CAPSLOCK}"
Case "SPACE"
fSendKeys "{SPACE}"
Case Else
fSendKeys (Command1(Index).Caption)
End Select
End Sub
' je récupère le focus de la fenêtre qui précède l'appel au clavier
', si c'est le mien je garde l'ancienne valeur
Private Sub Command1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ShowState As Long
Dim lHwn As Long
lHwn = GetForegroundWindow If (Not lHwn Me.hWnd) And (lHwn <> 0) Then PriorHwnd lHwn
End Sub
Private Sub Form_Load()
' top most call
Dim lngRetVal As Long
lngRetVal = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, _
0, 0, SWP_NOSIZE Or SWP_NOMOVE)
End Sub
Private Sub majuscule_Click(Index As Integer)
'Command5.Item = True
End Sub
Private Sub menu_Click(Index As Integer)
Unload Me
End Sub