LOCK EVERYTHING IN WINDOWS

Please discuss general Delphi programming topics here.

LOCK EVERYTHING IN WINDOWS

Postby Mohammad Ahmadzadeh » September 15th, 2005, 8:16 am

Hi everybody,
As you know, if you press WIN+L keys in WindowsXP, Windows stucks and nothing will work until you log in to Windows (Ctrl+Alt+Del, Win+R, Alt+Tab, Ctrl+Esc, …. will NOT work, but programs are still working in memory).
I want to simulate this by programming. Suppose I have a button on the form by pressing it, Windows locks and for unlocking it user must enter his/her own password.
Programmatically I can simulate pressing WIN+L keys, but I have a list of people in my database with their own password and I want to manage them manually, so I can not use WIN+L and have to simulate it.
Can anyone help me?
Cheerio

Mohammad Ahmadzadeh
Mohammad Ahmadzadeh
Active Member
Active Member
 
Posts: 7
Joined: September 15th, 2005, 7:25 am
Location: Iran

Postby Kambiz » September 16th, 2005, 9:15 am

Hi,

You can call LockWorkStation Windows API.

Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Mohammad Ahmadzadeh » September 17th, 2005, 10:33 am

Hi Kambiz

There is a misunderstanding!

I didn't know "LockWorkStation" API and thank you for it, but I want to simulate it, which means locking everything and just my program work.

By the way I found dWinLock component from "http://www.dwinlock.kassl.de", but it can not disable Alt+Shift+TAB and also is trial.

Do you know any other way?
Cheerio

Mohammad Ahmadzadeh
Mohammad Ahmadzadeh
Active Member
Active Member
 
Posts: 7
Joined: September 15th, 2005, 7:25 am
Location: Iran

Postby Radagast » September 22nd, 2005, 2:54 pm

Why don't you use OnKeyPress to disable any reaction on hitting Alt? I know it's stupid but it's as simple as you can imagine. Just add line that makes system believe Alt (and/or Ctrl) is not pressed.
Or you can always ask system to give focus back to your application after losing it. Result should be the same as disabling Alt+(Shift+)Tab.
Radagast
Active Member
Active Member
 
Posts: 24
Joined: May 1st, 2005, 9:32 pm
Location: Poland

Postby Mohammad Ahmadzadeh » September 23rd, 2005, 3:41 pm

Thanx Radagast, I'll work on it! :wink:
Cheerio

Mohammad Ahmadzadeh
Mohammad Ahmadzadeh
Active Member
Active Member
 
Posts: 7
Joined: September 15th, 2005, 7:25 am
Location: Iran


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 11 guests

cron