Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

API call for Windows2000 to lock the keyboard

Posted on 2004-08-16
2
Medium Priority
?
350 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 500 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

722 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