Results 1 to 5 of 5

Thread: how to lock the keyboard

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Posts
    144

    how to lock the keyboard

    ie. when my application is started, the keyboard must be locked, such that the user is allowed to use only the mouse, when my application is unloaded, the usual setting must be retained(ie. the keyboard must work),

    how to proceed,

    any suggestion, samples appreciated

    thanx in advance

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930
    do you want the keyboard to work in other applications that are running in other programs when yours is running, or just block the keyboard completely.

    I don't think there is an easy way of blocking the keyboard entirely across the system, you can block the mouse and keyboard together using the BlockInput API (NT/2000 upwards only).

    For keyboard blocking on just your app you could ignore any keyboard input (set the forms keypreview to false and set the keys to 0 in the form_keypress event)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Posts
    144

    .

    possibly for both use(ie, for my app. and whole keyboadr),

    but still i will try ur suggestion.

  4. #4
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Try this!
    Keyboard lock
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Posts
    144

    hi jian2587

    ur link is not working, pls check ur link

    \\%winbootdir%\system\rundll32.exe keyboard,disable


    if the above is not an url link, i think it is the syntax to be used in the system, so the above syntax is for disabling the for enabling the keyboard, can i replace disable to enable

    thanx
    Last edited by senthilkbs; Oct 12th, 2002 at 03:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width