Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Block system wide key

Posted on 2005-03-23
9
Medium Priority
?
222 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

564 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