Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 May : Disabling an input dialog box prior to registration
| Subject: | Disabling an input dialog box prior to registration |
| Posted by: | "John Warren" (john.warr..@netti.fi) |
| Date: | Tue, 23 May 2006 15:21:03 |
Dear Expert Programmer,
I will be deploying my mathematical application to the public; but before
then I will like to provide a protection strategies for the application.
The application requires an input file (*.txt) to be input before a
calculation can be made.
I have already searched the search engines like google.com, tamaracka.com,
etc, without finding the appropriated solution to my thinking.
My problem is how to disable the input dialog box. The input dialog box will
be provided to the user after pressing a ClickButton.
The protection strategies I am seeking are as follows:
1) The input dialog box is available to the user after pressing a button;
2) A predefined global file is initially available to the application; as
seen within the code below;
3) Nevertheless, the input dialog box is disabled, i.e. it does allow the
user to perform any further operation or action on it; at first instance
prior to registration;
4) The task/function of the input dialog box will be available after a
condition is fulfilled, after registration; say, after a variable returns
true; example a Boolean expression: AlreadyRegistered:= true;
Below is the present stage of my ClickButton procedure!!!!!
procedure TMainForm.Open1Click(Sender: TObject);
var AlreadyRegistered: Boolean; // Note! This variable will be global
begin
OpenDialog1.FileName:=Input_File;
if Root_Directory='' then
OpenDialog1.InitialDir:=ExtractFilePath(Application.ExeName)
else
OpenDialog1.InitialDir:=Root_Directory;
if OpenDialog1.Execute then begin
OptionDialog.varInput_File.Value:=OpenDialog1.FileName;
OptionDialog.varRoot_Directory.Value:=
ExtractFilePath(OpenDialog1.FileName);
Reset;
end;
end;
A working code that envisages the above intentions/strategies will be highly
appreciated.
Thanks very much in advance.
Best regards from FINLAND,
John
john.warren@netti.fi