j'ai essay=E9 de placer un hook comme suit mais cela ne=20
marche pas. l'indicateur LockTab est positionn=E9 =E0 True=20
lorsque la saisie doit =EAtre bloqu=E9e puis =E0 False=20
lorsqu'elle est autoris=E9e
---------------------------------------------------------
Private Sub Form_Load()
HookForm Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnHookForm Me
End Sub
Public LockTab as boolean
private PrevDoc as long
Public Sub HookForm(F As Form)
PrevProc =3D SetWindowLong(F.hwnd, GWL_WNDPROC,=20
AddressOf WindowProc)
End Sub
Public Sub UnHookForm(F As Form)
SetWindowLong F.hwnd, GWL_WNDPROC, PrevProc
End Sub
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg=20
As Long, ByVal wParam As Long, ByVal lParam As Long) As=20
Long
If LockTab Then Exit Function
WindowProc =3D CallWindowProc(PrevProc, hwnd, uMsg,=20
wParam, lParam)
End Function
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
le_troll
Bonjour, il me semble que justement la touche TAB n'est pas redirigeable, alors ce que tu peux faire c'est tester le focus de ce qui se trouve où tu ne veux pas qu'on aille... -- Merci, @+, bye, Joe
------------------------------------------ Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Jean Saint Jalmes" a écrit dans le message de news: e80801c43cbe$a1556ec0$ Bonjour,
Comment masquer la touche TAB pour que l'utilisateur ne puisse pas l'utiliser ?
j'ai essayé la solution suivante qui ne marche pas
j'ai essayé de placer un hook comme suit mais cela ne marche pas. l'indicateur LockTab est positionné à True lorsque la saisie doit être bloquée puis à False lorsqu'elle est autorisée
--------------------------------------------------------- Private Sub Form_Load() HookForm Me End Sub
Private Sub Form_Unload(Cancel As Integer) UnHookForm Me End Sub
Public LockTab as boolean private PrevDoc as long
Public Sub HookForm(F As Form) PrevProc = SetWindowLong(F.hwnd, GWL_WNDPROC, AddressOf WindowProc) End Sub
Public Sub UnHookForm(F As Form) SetWindowLong F.hwnd, GWL_WNDPROC, PrevProc End Sub
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If LockTab Then Exit Function WindowProc = CallWindowProc(PrevProc, hwnd, uMsg, wParam, lParam) End Function
Bonjour, il me semble que justement la touche TAB n'est pas redirigeable,
alors ce que tu peux faire c'est tester le focus de ce qui se trouve où tu
ne veux pas qu'on aille...
--
Merci, @+, bye, Joe
montmartre75@iFrance.com
------------------------------------------
Avec une hache, celui qui tient le manche a toujours raison !
------------------------------------------
"Jean Saint Jalmes" <anonymous@discussions.microsoft.com> a écrit dans le
message de news: e80801c43cbe$a1556ec0$a501280a@phx.gbl...
Bonjour,
Comment masquer la touche TAB pour que l'utilisateur ne
puisse pas l'utiliser ?
j'ai essayé la solution suivante qui ne marche pas
j'ai essayé de placer un hook comme suit mais cela ne
marche pas. l'indicateur LockTab est positionné à True
lorsque la saisie doit être bloquée puis à False
lorsqu'elle est autorisée
---------------------------------------------------------
Private Sub Form_Load()
HookForm Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnHookForm Me
End Sub
Public LockTab as boolean
private PrevDoc as long
Public Sub HookForm(F As Form)
PrevProc = SetWindowLong(F.hwnd, GWL_WNDPROC,
AddressOf WindowProc)
End Sub
Public Sub UnHookForm(F As Form)
SetWindowLong F.hwnd, GWL_WNDPROC, PrevProc
End Sub
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg
As Long, ByVal wParam As Long, ByVal lParam As Long) As
Long
If LockTab Then Exit Function
WindowProc = CallWindowProc(PrevProc, hwnd, uMsg,
wParam, lParam)
End Function
Bonjour, il me semble que justement la touche TAB n'est pas redirigeable, alors ce que tu peux faire c'est tester le focus de ce qui se trouve où tu ne veux pas qu'on aille... -- Merci, @+, bye, Joe
------------------------------------------ Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Jean Saint Jalmes" a écrit dans le message de news: e80801c43cbe$a1556ec0$ Bonjour,
Comment masquer la touche TAB pour que l'utilisateur ne puisse pas l'utiliser ?
j'ai essayé la solution suivante qui ne marche pas
j'ai essayé de placer un hook comme suit mais cela ne marche pas. l'indicateur LockTab est positionné à True lorsque la saisie doit être bloquée puis à False lorsqu'elle est autorisée
--------------------------------------------------------- Private Sub Form_Load() HookForm Me End Sub
Private Sub Form_Unload(Cancel As Integer) UnHookForm Me End Sub
Public LockTab as boolean private PrevDoc as long
Public Sub HookForm(F As Form) PrevProc = SetWindowLong(F.hwnd, GWL_WNDPROC, AddressOf WindowProc) End Sub
Public Sub UnHookForm(F As Form) SetWindowLong F.hwnd, GWL_WNDPROC, PrevProc End Sub
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If LockTab Then Exit Function WindowProc = CallWindowProc(PrevProc, hwnd, uMsg, wParam, lParam) End Function