[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How do I  make a program that asks for a password on entry?

Posted on 1999-11-10
7
Medium Priority
?
119 Views
Last Modified: 2010-05-18
I have being having problems with my program, but what I simply can't get my head around is how to make my program when it starts! Please can you answer the question as a whole form as it can get very confusing!
0
Comment
Question by:9HADLEYA
7 Comments
 
LVL 7

Expert Comment

by:RBertora
ID: 2196990
Your question is very confusing!!!
Rob ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2197025
hi 9HADLEYA,

define a form as your passwordform like

unit ufrmLogon;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, ExtCtrls;

type
  TfrmLogon = class(TForm)
    Panel1: TPanel;
    Bevel1: TBevel;
    Bevel2: TBevel;
    Bevel3: TBevel;
    EdDBName: TEdit;
    EdAnwender: TEdit;
    EdPassword: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    btOK: TBitBtn;
    btAbort: TBitBtn;
    procedure btOKClick(Sender: TObject);
    procedure btAbortClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    DoLogon : Boolean;
    { Public declarations }
  end;

var
  frmLogon: TfrmLogon;


implementation

{$R *.DFM}

procedure TfrmLogon.btOKClick(Sender: TObject);
begin
  DoLogon := True;
  close;
end;

procedure TfrmLogon.btAbortClick(Sender: TObject);
begin
  close;
end;

procedure TfrmLogon.FormCreate(Sender: TObject);
begin
  DoLogon := False;
end;

end.

now your can modify your project-source
like

program log_test;

uses
  Forms,
  log_test_u in 'log_test_u.pas' {Form1},
  ufrmLogon in '\\ARNOLD\MKretzschmar\inTime\source\ufrmLogon.pas' {frmLogon};

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TfrmLogon, frmLogon);
  frmLogon.ShowModal;
  if frmLogon.DoLogon then
  begin
    //check name password
    //if ok
    frmLogon.Release;
    Application.Run;
  end;
end.

just a sample
other ways are also possible

meikl ;-)
0
 
LVL 17

Expert Comment

by:inthe
ID: 2197027
yes i am also confused by the question..
you ant to autocreate form?,start an external app when your starts?,build all?
please give more details and clearly so we understand better..
cheers Barry
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
LVL 17

Expert Comment

by:inthe
ID: 2197032
hi meikl ..was that a guess?? ;-)
0
 

Author Comment

by:9HADLEYA
ID: 2197033
go away you pig!

what I really meant was jus

Oh forget it
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2197057
hi rob, hi barry,
the title says all:

How do I make a program that asks for a password on entry?

but well in the new layout the whole title comes very little. and yes, the rest was guessed.

meikl ;-)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 2197067
oops,
q is deleted,
well good that
one undeleted page-instance
is in the browser cache.

9HADLEYA, why did you deleted this?

(checked as answer !!)

meikl

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

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…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses

591 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