?
Solved

Setsysmodalwindow? A more secure password program?

Posted on 1997-05-27
5
Medium Priority
?
288 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 280 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 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