Solved

Setsysmodalwindow? A more secure password program?

Posted on 1997-05-27
5
280 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

12 Experts available now in Live!

Get 1:1 Help Now