Solved

Setsysmodalwindow? A more secure password program?

Posted on 1997-05-27
5
279 Views
Last Modified: 2010-04-03
I have written an access control program in delphi 16 using SetSysModalWindow to lock out the mouse and alt tab etc. Of course you can still use ctrl-alt-del to shut it down in 95.

I am now trying to redo it in delphi 2 and make it more secure. I have considered doing thunking to make SetSysModalWindow work, but I'd like to stop the user ending the task with ctrl-alt-del. The program picks up username and password from my server app via TCP/IP.

Any suggestions? Device driver maybe?
0
Comment
Question by:richweed
  • 3
  • 2
5 Comments
 

Author Comment

by:richweed
ID: 1336604
Adjusted points to 75
0
 
LVL 3

Accepted Solution

by:
sperling earned 70 total points
ID: 1336605
To disable/enable C+A+D, use the following:

Enable:
SystemParametersInfo (97, WORD(TRUE), @Dummy, 0);

Disable:
SystemParametersInfo (97, WORD(FALSE), @Dummy, 0);

Dummy is a variable of type WORD. This works under Win 95 only, not NT.

A simple fix to make any form modal, is to create an app with a maximized, borderless mainform. In the applications OnDeactivate event, reactivate the app. Show your login dialog as fsStayOnTop to make it stay above your mainform.

Regards,

Erik.
0
 

Author Comment

by:richweed
ID: 1336606
Sperling, thanks a lot, but what if you don't want your app to be full screen? (I like to be able to see what is happening) I've considered trying to lock the mouse into the window, but that's not really the done thing.
When you say reactivate the app, Form1.Activate is surely not right, as this doesn't do much.
By the way, I'm not using a dialog box for the password input, I have the controls on the main form.
0
 
LVL 3

Expert Comment

by:sperling
ID: 1336607
You can't make a system modal form in 32-bit windows.... Thunking won't help, as the window will only be modal in the Win16 subsystem...

Only possibility is to keep your application on top, using Application.BringToFront in the OnDeactivate event as far as I recall. This will probably still allow users to use e.g. keyboard shortcuts to launch other apps.

Regards,

Erik.
0
 

Author Comment

by:richweed
ID: 1336608
Thanks Erik

Can you suggest any good refences for this sort of info?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now