Solved

Setsysmodalwindow? A more secure password program?

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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