?
Solved

Creating a password-protected program

Posted on 1999-11-03
4
Medium Priority
?
145 Views
Last Modified: 2010-04-04
Thankyou for taking your time to read this question. What I really want to know is how to create a program that onActivate it will prompt you for a passord!

I have tried and tried to get it to work but the script in Delphi 3 keeps on displaying error messages!

Please could you show me in detail how to create a program like that! In detail and correct script please!

This is worth 100 points!

In Delphi format please........
0
Comment
Question by:KINSALE
4 Comments
 
LVL 2

Accepted Solution

by:
danysz earned 200 total points
ID: 2180115
You can use the new component from rxlib ( version 2.75). TPasswordDialog.
or create a Login form that you call her alone !!! in the dpr :
frmLogin := TfrmLogin;
if frmLogin.ShowModal = mrOk and
   then security := frmLogin.Security;
frmLogin.Free;

if security =0 then
   exit;

Application.FormCreate( frmMain);
....
....
end.

Dany
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2180117
hi kinsale,

maybe this helps

modify your Project sourcecode as follows

program pw_app;

uses
  Forms,
  pw_main_u in 'pw_main_u.pas' {Form1},
  pwf_u in 'pwf_u.pas' {PWF};  //PasswordForm not autocreated

{$R *.RES}

Const
  PW = 'PASSWORD';

begin
  Application.Initialize;
  PWF := TPWF.Create(Application);
  PWF.ShowModal;
  If PWF.Edit1.Text = PW then
  begin
    PWF.Release;  //Release
    Application.CreateForm(TForm1, Form1);
    Application.Run;
  end
  else PWF.Release;  //Release
end.

meikl
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2180162
yeah i know what you mean, delphi runs to forms at the same time resulting in a memory error address, yeah i got plenty of them problems. The only other problem a little password box like that is situated on another form, so then because of this your actuall program can still be accessed regardless of if you form is up with showmodal.

take a look at my protect program and if you see something you like in it, you can have the source to it.

http://members.xoom.com/craig_c/

The fisrt program you see is protect, another program is mouse.exe this will be your worst nightmare, this unlocks forms using the handle of that window and an api called... enablewindow();  if you find a secure way of a password box please let me know (anyone)

Craig C.
0
 
LVL 1

Expert Comment

by:men xin
ID: 2211373
I agree with kretzschmar.
You can create your own PassWordInput form to accept user's input.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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…
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…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

598 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