Désactiver touches clavier

satoum66 Messages postés 5 Date d'inscription vendredi 6 mai 2005 Statut Membre Dernière intervention 9 juin 2005 - 21 mai 2005 à 18:54
satoum66 Messages postés 5 Date d'inscription vendredi 6 mai 2005 Statut Membre Dernière intervention 9 juin 2005 - 24 mai 2005 à 17:58
salut a tous je veut savoir le code simple en vb.net pour désactiver ctrl+alt+supp(j'ai pas troouvé pour win xp) et menu demarrer et alt+tab.c'est tres important pour moi.
et mersi encore
A+

2 réponses

nawakator Messages postés 51 Date d'inscription lundi 12 mai 2003 Statut Membre Dernière intervention 8 février 2011
23 mai 2005 à 15:33
Je ne sais pas si c'est très facile à faire. Presonnelement je n'y suis pas arriver. Dans ma sociétée on à trouver un truc qui s'appele KeyTrap c'est un programme externe.Les touches Alt+Ctrl+Supp et la touche windows sont géreés par windows puis transmisent à ton application. Il faut donc un programme externe qui les intercepte avant ton application.

Bye,
0
satoum66 Messages postés 5 Date d'inscription vendredi 6 mai 2005 Statut Membre Dernière intervention 9 juin 2005
24 mai 2005 à 17:58
il m'envoiyé nawakator et je sais pas comment ca marche
Message :
Declare Sub KeyTrapSet Lib "KeyTrap" (ByVal Texte As String, ByVal flag As Boolean)
Declare Sub WWDllInit Lib "KeyTrap" ()
Declare Sub WWDllFree Lib "KeyTrap" ()

' PAGE
'**************************************************************************
'* Fonction : FSE_Clavier Version : 1.00 *
'* Objet : Blocage/Deblocage clavier KeyTrap *
'* *
'* Appel(s) particulier(s) : *
'* - Aucun *
'* Paramètre(s) d'entrée : *
'* - Aucun *
'* Paramètre(s) de sortie: *
'* - Aucun *
'* Code de retour : *
'* - Aucun *
'**************************************************************************
Sub FSE_Clavier()

Dim Commande As String ' Commande
Dim ValeurCommande As Integer ' Etat commande

' Action clavier
Select Case GB_Blocage

' - Blocage
Case True

' * Blocage du clavier
Call WWDllInit

Commande = "TRAP" + Chr(0)
ValeurCommande = 1
Call KeyTrapSet(Commande, ValeurCommande)

Commande = "REBOOT" + Chr(0)
ValeurCommande = 0
Call KeyTrapSet("REBOOT" + Chr(0), ValeurCommande)

ValeurCommande = 0
Commande = "TASKSWITCH" + Chr(0)
Call KeyTrapSet("TASKSWITCH" + Chr(0), ValeurCommande)

' * Modification icone du bouton
Menu.BoutonBlocage.Picture = LoadPicture(K_ICONBLOCAGE)
' * Bouton 'quitter' invisible
Menu.Quitter.Visible = False

' - Déblocage
Case False

' * Déblocage du clavier
Commande = "TRAP" + Chr(0)
ValeurCommande = 1
Call KeyTrapSet(Commande, ValeurCommande)

Commande = "REBOOT" + Chr(0)
Call KeyTrapSet("REBOOT" + Chr(0), ValeurCommande)

Commande = "TASKSWITCH" + Chr(0)
Call KeyTrapSet("TASKSWITCH" + Chr(0), ValeurCommande)

Call WWDllFree
' * Modification icone du bouton
Menu.BoutonBlocage.Picture = LoadPicture(K_ICONDEBLOCAGE)
' * Bouton 'quitter' visible
Menu.Quitter.Visible = True

End Select

End Sub
0
Rejoignez-nous