home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Language specific support
MediaPortal Forums Francais
MediaPortal 1 - Support
Interfaces Input / Output (VFD,télécommande)
Pavé numérique télécomande MCE
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mehdi" data-source="post: 439652"><p>[code]Const VK_CAPITAL = &H14 'Code de la touche CapsLock</p><p></p><p>Private Type KeyboardBytes </p><p> kbByte(0 To 255) As Byte </p><p>End Type </p><p></p><p>Private Declare Function GetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long </p><p>Private Declare Function SetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long </p><p>Dim kbArray As KeyboardBytes, kbOld As KeyboardBytes</p><p></p><p>'----------------------------------------------------</p><p>Private Sub Active(vkKey As Long, Actif As Byte) </p><p> GetKeyboardState kbArray </p><p> kbArray.kbByte(vkKey) = Actif </p><p> SetKeyboardState kbArray </p><p>End Sub </p><p></p><p>'-----------------------------------------------------</p><p>Private Sub Form_Load() </p><p> GetKeyboardState kbOld' se rappeler l'état initial du clavier </p><p>End Sub </p><p></p><p>'-----------------------------------------------------</p><p>Private Sub Form_Unload(Cancel As Integer) </p><p> SetKeyboardState kbOld' restaurer l'état initial du clavier </p><p>End Sub </p><p></p><p>'-----------------------------------------------------</p><p>'Pour (par exemple) activer le verrouillage majuscules, </p><p>'Active VK_CAPITAL, 1 </p><p> </p><p>'pour le désactiver : </p><p>'Active VK_CAPITAL, 0[/code]</p><p></p><p>Voici un code VB pour créer un mini-programme pour activer la touche (à lancer au démarrage, je n'ai pas de compilateur VB là tout de suite pour tester... désolé. <img src="http://www.mp-fr.com/forums/style_emoticons/<#EMO_DIR#>/unsure.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p></blockquote><p></p>
[QUOTE="mehdi, post: 439652"] [code]Const VK_CAPITAL = &H14 'Code de la touche CapsLock Private Type KeyboardBytes kbByte(0 To 255) As Byte End Type Private Declare Function GetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long Private Declare Function SetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long Dim kbArray As KeyboardBytes, kbOld As KeyboardBytes '---------------------------------------------------- Private Sub Active(vkKey As Long, Actif As Byte) GetKeyboardState kbArray kbArray.kbByte(vkKey) = Actif SetKeyboardState kbArray End Sub '----------------------------------------------------- Private Sub Form_Load() GetKeyboardState kbOld' se rappeler l'état initial du clavier End Sub '----------------------------------------------------- Private Sub Form_Unload(Cancel As Integer) SetKeyboardState kbOld' restaurer l'état initial du clavier End Sub '----------------------------------------------------- 'Pour (par exemple) activer le verrouillage majuscules, 'Active VK_CAPITAL, 1 'pour le désactiver : 'Active VK_CAPITAL, 0[/code] Voici un code VB pour créer un mini-programme pour activer la touche (à lancer au démarrage, je n'ai pas de compilateur VB là tout de suite pour tester... désolé. [img]http://www.mp-fr.com/forums/style_emoticons/<#EMO_DIR#>/unsure.gif[/img] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
MediaPortal Forums Francais
MediaPortal 1 - Support
Interfaces Input / Output (VFD,télécommande)
Pavé numérique télécomande MCE
Contact us
RSS
Top
Bottom