Solved

API call for Windows2000 to lock the keyboard

Posted on 2004-08-16
2
329 Views
Last Modified: 2013-11-13
Hi,
I have created a VB application to lock the computer (VB6) using the
following APIS:
clipcursor
getwindowrect
systemparamtersinfo (SPI_SCREENSAVERRUNNING)

The mechanism is that when the user locks the windows, the getwindowrect API gets the rectangular region of the form and clips the cursor so that it cannot move on the desktop. The Systemparamtersinfo API then locks the keyboard until the user enters the required password in the vb6 application. This app works fine under windows 98. However, under windows 2000 the systemparametersinfo(SPI_SCREENSAVERRUNNING) doesnot work. As a result,
the keyboard shortcuts such as CTL-ALT-DEL and CTL-TAB work even when
my VB6 application has locked the cursor within the rectangular region
of the form. Is there any alternative to the Systemparametersinfo API
that can do the lock the keyboard (not to the application but to
the rest of the windows)

THnaks
Rafay
0
Comment
Question by:rbali2004
[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
2 Comments
 
LVL 11

Expert Comment

by:Jase-Coder
ID: 11813218
0
 
LVL 2

Accepted Solution

by:
zonaltech earned 125 total points
ID: 11830677
Here's an example project that uses the keyboard hooking and mouse restriction you are talking about:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=54463&lngWId=1

It disables low level keys in NT, 2000, and XP.

Hope it helps!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

751 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