?
Solved

Block system wide key

Posted on 2005-03-23
9
Medium Priority
?
220 Views
Last Modified: 2008-03-06
Hi Experts,

I'm able to block system wide keys using this project http://vbnet.mvps.org/index.html?code/hooks/lowlevelkeyboardproc.htm

I able to block ctrl.
I able to block numlock.

Problem is I can't block "Ctrl + numlock".

Please kindly guide me how to implement to block "Ctrl + numlock". vb6

Private Const VK_NUMLOCK = &H90

Thanks.
0
Comment
Question by:lynnton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
9 Comments
 
LVL 23

Accepted Solution

by:
gecko_au2003 earned 2000 total points
ID: 13610973
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13610978
He made a dll to do it via low level access and it blocks a whole bunch of stuff, it comes with source code , etc :) Let me know if this helps you out any :)
0
 
LVL 1

Author Comment

by:lynnton
ID: 13611030
gecko_au2003,

Do you think we can make it work using the method I've posted?

Blocking ctrl +numlock ?

Thanks.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13611064
If you add the code below :

      If (kbdllhs.vkCode = VK_NUMLOCK) And _
          CBool(GetAsyncKeyState(VK_CONTROL) _
          And &H8000) Then
         
        Debug.Print "Ctrl+ num blocked"
       
        LowLevelKeyboardProc = 1
        Exit Function

It requires that you hold down ctrl + shift and then numlock , but that works. I am trying to figure out how to get rid of the shift key part though.
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13611106
ok I cant figure out why you have to hold shift down for the ctrl + numlock to work but thats all I could manage to figure out for now, since it is 6:24 am here.

It is pretty much the same from what I can see with regards to comparing it to the other examples on how to detect the key press of key combinations, so this looks like a toughy lol.
0
 
LVL 1

Author Comment

by:lynnton
ID: 13611149
gecko_au2003,

I'll repost this question and hope other experts would join.

-I had fun on your home page.

Thanks.

0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13611191
lol @ fun on my home page :) hopefully they can help you out because I cant understand why you have to use the shift key as well, thats got me stumped
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13611194
Than Q for points and grade btw :)
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13611213
What did you like about my home page , just outta curiousty ?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question