Solved

Setsysmodalwindow? A more secure password program?

Posted on 1997-05-27
5
283 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find and Replace Stream with 0s 8 82
How to build JSON File in Delphi 6 3 86
Breakpoint doesn't stop in my variable 3 45
Automatic field translation delphi 10.2 6 40
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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