SRL Archive - Discussions and Debates

Second Form wont open!


steth1010

2007-05-21 22:00:42

When i make it press a button the second form wont open? hmm

Plz help ill show u the script if u need to see it becus atm i am deleting my user name and pw out of it so u can see it

heres the script now just s small simple one (First form)

Changing start to a diff name but how can i make it right now when hit start open the Yew_Banker form?

program New;

var
User_Info : TForm;
Username : TLabel;
Password : TLabel;
Edit2 : TEdit;
Edit1: TEdit;
Start : TButton;
Yew_Banker : TForm;
Create_User : TButton;
Delete_User : TButton;
Memo1 : TMemo;

procedure ButtonClick(sender: TObject);
begin
WriteLn('Started Script');
User_Info.Caption:= User_Info.Caption + '.';
User_Info.ModalResult:= mrOk;
end;

procedure InitForm;
begin
User_Info := CreateForm;
User_Info.Left := 383;
User_Info.Top := 236;
User_Info.Width := 294;
User_Info.Height := 238;
User_Info.Caption := 'User_Info';
User_Info.Color := clBtnFace;
User_Info.Font.Color := clWindowText;
User_Info.Font.Height := -11;
User_Info.Font.Name := 'MS Sans Serif';
User_Info.Font.Style := [];
User_Info.Visible := False;
User_Info.PixelsPerInch := 96;
Username := TLabel.Create(User_Info);
Username.Parent := User_Info;
Username.Left := 50;
Username.Top := 46;
Username.Width := 48;
Username.Height := 13;
Username.Caption := 'Username';
Password := TLabel.Create(User_Info);
Password.Parent := User_Info;
Password.Left := 51;
Password.Top := 81;
Password.Width := 46;
Password.Height := 13;
Password.Caption := 'Password';
Edit1 := TEdit.Create(User_Info);
Edit1.Parent := User_Info;
Edit1.Left := 103;
Edit1.Top := 43;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'Edit1';
Edit2 := TEdit.Create(User_Info);
Edit2.Parent := User_Info;
Edit2.Left := 103;
Edit2.Top := 78;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.Text := 'Edit2';
Start := TButton.Create(User_Info);
Start.OnClick:=@ButtonClick;
Start.Parent := User_Info;
Start.Left := 116;
Start.Top := 128;
Start.Width := 75;
Start.Height := 25;
Start.Caption := 'Start';
Start.TabOrder := 10;
Yew_Banker := CreateForm;
Yew_Banker.Left := 271;
Yew_Banker.Top := 104;
Yew_Banker.Width := 508;
Yew_Banker.Height := 548;
Yew_Banker.Caption := 'Yew_Banker';
Yew_Banker.Color := clBtnFace;
Yew_Banker.Font.Color := clWindowText;
Yew_Banker.Font.Height := -11;
Yew_Banker.Font.Name := 'MS Sans Serif';
Yew_Banker.Font.Style := [];
Yew_Banker.Visible := False;
Yew_Banker.PixelsPerInch := 96;
Create_User := TButton.Create(Yew_Banker);
Create_User.Parent := Yew_Banker;
Create_User.Left := 40;
Create_User.Top := 13;
Create_User.Width := 95;
Create_User.Height := 40;
Create_User.Caption := 'Create_User';
Create_User.TabOrder := 8;
Delete_User := TButton.Create(Yew_Banker);
Delete_User.Parent := Yew_Banker;
Delete_User.Left := 369;
Delete_User.Top := 13;
Delete_User.Width := 101;
Delete_User.Height := 41;
Delete_User.Caption := 'Delete_User';
Delete_User.TabOrder := 9;
Memo1 := TMemo.Create(Yew_Banker);
Memo1.Parent := Yew_Banker;
Memo1.Left := 166;
Memo1.Top := 2;
Memo1.Width := 185;
Memo1.Height := 183;
Memo1.Lines.Add(' EDGEVILLE ');
Memo1.Lines.Add('YEW BANKER!');
Memo1.Lines.Add('Click Create users to add more users ');
Memo1.Lines.Add('and fill in the information');
Memo1.Lines.Add('Click delete user to delete the last ');
Memo1.Lines.Add('user created.');
Memo1.Lines.Add('Click finish for the script to start and ');
Memo1.Lines.Add('everything be inserted into the script');
Memo1.Lines.Add('Click Cancel to exit the form and ');
Memo1.Lines.Add('nothing be inserted into the script');
Memo1.Lines.Add('*Coming Soon*');
Memo1.Lines.Add('Have more options on run directions, ');
Memo1.Lines.Add('random stuff, auto talk info, ETC.');
Memo1.TabOrder := 10;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure SafeInitotherForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
User_Info.ShowModal;
end;

procedure ShowotherFormModal;
begin
Yew_Banker.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

procedure openTheOtherForm(sender : TObject);
begin
safeInitOtherForm;
end;

begin
SafeInitForm;
SafeShowFormModal;
FreeForm(User_Info); // Frees the form from memory.
end.

Rune Hacker

2007-05-22 00:40:28

Procedure ShowNewWindow(Sender: TObject);
begin
WhateverfrmDesign.Visible := True;
end;

and for the button, of course use .OnClick := @ShowNewWindow;

That help?

steth1010

2007-05-23 15:48:34

it says unknown indentifer on ShowNewWindow

After i put Start.OnClick := @ShowNewWindow;

Rune Hacker

2007-05-23 22:18:16

You used the procedure i posted? .OnClick will do whatever the procedure is above the script(in my first post, i said what it would be).

EDIT: Or rename the procedure, idk

steth1010

2007-05-24 21:45:06

yeah nothing working, hmm…

shaunthasheep

2007-05-25 10:40:12

for the second form just call Yew_Banker.Visible := True like runehacker said

The Un-Named

2007-05-25 13:24:17

I would SERIOUSLY call it safely, if you don't, you could crash SCAR!

steth1010

2007-05-25 17:34:08

alright i'll try that, lol but im not at my house for awhile im at my friends so i cant test my form, but as soon as I do ill check then post the results, thanks

steth1010

2007-05-26 13:10:39

k this is wut i got

program New;
var
User_Info : TForm;
Username : TLabel;
Password : TLabel;
Edit2 : TEdit;
Edit1: TEdit;
Start : TButton;
Yew_Banker : TForm;
Create_User : TButton;
Delete_User : TButton;
Memo1 : TMemo;

procedure ButtonClick(sender: TObject);
begin
WriteLn('Started Script');
User_Info.Caption:= User_Info.Caption + '.';
User_Info.ModalResult:= mrOk;
end;

procedure InitForm;
begin
User_Info := CreateForm;
User_Info.Left := 383;
User_Info.Top := 236;
User_Info.Width := 294;
User_Info.Height := 238;
User_Info.Caption := 'User_Info';
User_Info.Color := clBtnFace;
User_Info.Font.Color := clWindowText;
User_Info.Font.Height := -11;
User_Info.Font.Name := 'MS Sans Serif';
User_Info.Font.Style := [];
User_Info.Visible := False;
User_Info.PixelsPerInch := 96;
Username := TLabel.Create(User_Info);
Username.Parent := User_Info;
Username.Left := 50;
Username.Top := 46;
Username.Width := 48;
Username.Height := 13;
Username.Caption := 'Username';
Password := TLabel.Create(User_Info);
Password.Parent := User_Info;
Password.Left := 51;
Password.Top := 81;
Password.Width := 46;
Password.Height := 13;
Password.Caption := 'Password';
Edit1 := TEdit.Create(User_Info);
Edit1.Parent := User_Info;
Edit1.Left := 103;
Edit1.Top := 43;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'Edit1';
Edit2 := TEdit.Create(User_Info);
Edit2.Parent := User_Info;
Edit2.Left := 103;
Edit2.Top := 78;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.Text := 'Edit2';
Start := TButton.Create(User_Info);
Start.OnClick := @FormOpen;// This is where the unknown indenifer is
Start.Parent := User_Info;
Start.Left := 116;
Start.Top := 128;
Start.Width := 75;
Start.Height := 25;
Start.Caption := 'Start';
Start.TabOrder := 10;
Yew_Banker := CreateForm;
Yew_Banker.Left := 271;
Yew_Banker.Top := 104;
Yew_Banker.Width := 508;
Yew_Banker.Height := 548;
Yew_Banker.Caption := 'Yew_Banker';
Yew_Banker.Color := clBtnFace;
Yew_Banker.Font.Color := clWindowText;
Yew_Banker.Font.Height := -11;
Yew_Banker.Font.Name := 'MS Sans Serif';
Yew_Banker.Font.Style := [];
Yew_Banker.Visible := False;
Yew_Banker.PixelsPerInch := 96;
Create_User := TButton.Create(Yew_Banker);
Create_User.Parent := Yew_Banker;
Create_User.Left := 40;
Create_User.Top := 13;
Create_User.Width := 95;
Create_User.Height := 40;
Create_User.Caption := 'Create_User';
Create_User.TabOrder := 8;
Delete_User := TButton.Create(Yew_Banker);
Delete_User.Parent := Yew_Banker;
Delete_User.Left := 369;
Delete_User.Top := 13;
Delete_User.Width := 101;
Delete_User.Height := 41;
Delete_User.Caption := 'Delete_User';
Delete_User.TabOrder := 9;
Memo1 := TMemo.Create(Yew_Banker);
Memo1.Parent := Yew_Banker;
Memo1.Left := 166;
Memo1.Top := 2;
Memo1.Width := 185;
Memo1.Height := 183;
Memo1.Lines.Add(' EDGEVILLE ');
Memo1.Lines.Add('YEW BANKER!');
Memo1.Lines.Add('Click Create users to add more users ');
Memo1.Lines.Add('and fill in the information');
Memo1.Lines.Add('Click delete user to delete the last ');
Memo1.Lines.Add('user created.');
Memo1.Lines.Add('Click finish for the script to start and ');
Memo1.Lines.Add('everything be inserted into the script');
Memo1.Lines.Add('Click Cancel to exit the form and ');
Memo1.Lines.Add('nothing be inserted into the script');
Memo1.Lines.Add('*Coming Soon*');
Memo1.Lines.Add('Have more options on run directions, ');
Memo1.Lines.Add('random stuff, auto talk info, ETC.');
Memo1.TabOrder := 10;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure SafeInitotherForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
User_Info.ShowModal;
end;

procedure ShowotherFormModal;
begin
Yew_Banker.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

Procedure FormOpen(Sender: TObject);
begin
Yew_Banker.Visible := True
end;

begin
SafeInitForm;
SafeShowFormModal;
FreeForm(User_Info); // Frees the form from memory.
end.

I get this error

Line 68: [Error] (68:19): Unknown identifier 'FormOpen'

Pentti

2007-05-26 13:52:04

program New;
var
User_Info : TForm;
Username : TLabel;
Password : TLabel;
Edit2 : TEdit;
Edit1: TEdit;
Start : TButton;
Yew_Banker : TForm;
Create_User : TButton;
Delete_User : TButton;
Memo1 : TMemo;

procedure ButtonClick(sender: TObject);
begin
WriteLn('Started Script');
User_Info.Caption:= User_Info.Caption + '.';
User_Info.ModalResult:= mrOk;
end;

Procedure FormOpen(Sender: TObject);
begin
Yew_Banker.Visible := True
end;

procedure InitForm;
begin
User_Info := CreateForm;
User_Info.Left := 383;
User_Info.Top := 236;
User_Info.Width := 294;
User_Info.Height := 238;
User_Info.Caption := 'User_Info';
User_Info.Color := clBtnFace;
User_Info.Font.Color := clWindowText;
User_Info.Font.Height := -11;
User_Info.Font.Name := 'MS Sans Serif';
User_Info.Font.Style := [];
User_Info.Visible := False;
User_Info.PixelsPerInch := 96;
Username := TLabel.Create(User_Info);
Username.Parent := User_Info;
Username.Left := 50;
Username.Top := 46;
Username.Width := 48;
Username.Height := 13;
Username.Caption := 'Username';
Password := TLabel.Create(User_Info);
Password.Parent := User_Info;
Password.Left := 51;
Password.Top := 81;
Password.Width := 46;
Password.Height := 13;
Password.Caption := 'Password';
Edit1 := TEdit.Create(User_Info);
Edit1.Parent := User_Info;
Edit1.Left := 103;
Edit1.Top := 43;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'Edit1';
Edit2 := TEdit.Create(User_Info);
Edit2.Parent := User_Info;
Edit2.Left := 103;
Edit2.Top := 78;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.Text := 'Edit2';
Start := TButton.Create(User_Info);
Start.OnClick := @FormOpen;// This is where the unknown indenifer is
Start.Parent := User_Info;
Start.Left := 116;
Start.Top := 128;
Start.Width := 75;
Start.Height := 25;
Start.Caption := 'Start';
Start.TabOrder := 10;
Yew_Banker := CreateForm;
Yew_Banker.Left := 271;
Yew_Banker.Top := 104;
Yew_Banker.Width := 508;
Yew_Banker.Height := 548;
Yew_Banker.Caption := 'Yew_Banker';
Yew_Banker.Color := clBtnFace;
Yew_Banker.Font.Color := clWindowText;
Yew_Banker.Font.Height := -11;
Yew_Banker.Font.Name := 'MS Sans Serif';
Yew_Banker.Font.Style := [];
Yew_Banker.Visible := False;
Yew_Banker.PixelsPerInch := 96;
Create_User := TButton.Create(Yew_Banker);
Create_User.Parent := Yew_Banker;
Create_User.Left := 40;
Create_User.Top := 13;
Create_User.Width := 95;
Create_User.Height := 40;
Create_User.Caption := 'Create_User';
Create_User.TabOrder := 8;
Delete_User := TButton.Create(Yew_Banker);
Delete_User.Parent := Yew_Banker;
Delete_User.Left := 369;
Delete_User.Top := 13;
Delete_User.Width := 101;
Delete_User.Height := 41;
Delete_User.Caption := 'Delete_User';
Delete_User.TabOrder := 9;
Memo1 := TMemo.Create(Yew_Banker);
Memo1.Parent := Yew_Banker;
Memo1.Left := 166;
Memo1.Top := 2;
Memo1.Width := 185;
Memo1.Height := 183;
Memo1.Lines.Add(' EDGEVILLE ');
Memo1.Lines.Add('YEW BANKER!');
Memo1.Lines.Add('Click Create users to add more users ');
Memo1.Lines.Add('and fill in the information');
Memo1.Lines.Add('Click delete user to delete the last ');
Memo1.Lines.Add('user created.');
Memo1.Lines.Add('Click finish for the script to start and ');
Memo1.Lines.Add('everything be inserted into the script');
Memo1.Lines.Add('Click Cancel to exit the form and ');
Memo1.Lines.Add('nothing be inserted into the script');
Memo1.Lines.Add('*Coming Soon*');
Memo1.Lines.Add('Have more options on run directions, ');
Memo1.Lines.Add('random stuff, auto talk info, ETC.');
Memo1.TabOrder := 10;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure SafeInitotherForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
User_Info.ShowModal;
end;

procedure ShowotherFormModal;
begin
Yew_Banker.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;


begin
SafeInitForm;
SafeShowFormModal;
FreeForm(User_Info); // Frees the form from memory.
end.

Rune Hacker

2007-05-26 14:38:33

Yeah, you had the procedure at the bottom of the screen, all the procedures for the buttons and stuff should be above the initform

The Un-Named

2007-05-26 14:50:12

Perhaps you should study the script below. :p Small tutorial on the forward keyword.

procedure a;
begin
b;
end;

procedure b;
begin
a;
end;

begin
b;
end.

This script won't run, because the procedure a tries to search upwards for the b procedure.

procedure b; forward;

procedure a;
begin
b;
end;

procedure b;
begin
a;
end;

begin
b;
end.

This simply says, if it can't find b, search down instead of up. :p

Rune Hacker

2007-05-26 15:05:19

HAHA The Un-Named, basic, yet simple. Nicely put :p

steth1010

2007-05-26 15:34:25

lol I know that just iwasnt payin attention :P I worked on my form backwards to the start and i guess I screwed up.. lol I got it working now just adding images and more things to put in then the form is done for my MultiSkillz script. Its pretty sweet, look at my form now its just a start and only WoodCutting button and Start work so far cus im finishing the rest.
Also im adding a pic

program New;
var
User_Info : TForm;
texty : TMemo;
WoodCutting : TButton;
Fishing : TButton;
Fletching : TButton;
ItemPicker : TButton;
FireMaker : TButton;
Miner : TButton;
Essence : TButton;
Button8 : TButton;
Start : TButton;
frmDesign : TForm;
Edit1 : TEdit;
Edit2 : TEdit;
Label1 : TLabel;
Label2 : TLabel;
Button1 : TButton;
Username1, Password1 : String;

procedure ButtonClick(sender: TObject);
begin
WriteLn('Started Script');
User_Info.Caption:= User_Info.Caption + '.';
User_Info.ModalResult:= mrOk;
end;

Procedure FormOpen(Sender: TObject);
begin
frmdesign.Visible := True
end;

procedure InitForm;
begin
User_Info := CreateForm;
User_Info.Left := 259;
User_Info.Top := 98;
User_Info.Width := 492;
User_Info.Height := 372;
User_Info.Caption := 'User_Info';
User_Info.Color := clBtnFace;
User_Info.Font.Color := clWindowText;
User_Info.Font.Height := -11;
User_Info.Font.Name := 'MS Sans Serif';
User_Info.Font.Style := [];
User_Info.Visible := False;
User_Info.PixelsPerInch := 96;
texty := TMemo.Create(User_Info);
texty.Parent := User_Info;
texty.Left := 166;
texty.Top := 86;
texty.Width := 143;
texty.Height := 119;
texty.Lines.Add('Thanks for using Multi Skillz ');
texty.Lines.Add('by Steth10');
texty.Lines.Add('');
texty.Lines.Add('Choose the skill that you ');
texty.Lines.Add('made true and fill out all the ');
texty.Lines.Add('information. I made it as easy ');
texty.Lines.Add('as possible for setup. When ');
texty.Lines.Add('your done just hit start and ');
texty.Lines.Add('watch the script go! This ');
texty.Lines.Add('form is very easy to use, just ');
texty.Lines.Add('type in what ever you need ');
texty.Lines.Add('to fill in.');
texty.TabOrder := 8;
WoodCutting := TButton.Create(User_Info);
WoodCutting.OnClick :=@FormOpen;
WoodCutting.Parent := User_Info;
WoodCutting.Left := 33;
WoodCutting.Top := 57;
WoodCutting.Width := 75;
WoodCutting.Height := 25;
WoodCutting.Caption := 'WoodCutting';
WoodCutting.TabOrder := 9;
Fishing := TButton.Create(User_Info);
Fishing.Parent := User_Info;
Fishing.Left := 33;
Fishing.Top := 116;
Fishing.Width := 75;
Fishing.Height := 25;
Fishing.Caption := 'Fishing';
Fishing.TabOrder := 10;
Fletching := TButton.Create(User_Info);
Fletching.Parent := User_Info;
Fletching.Left := 34;
Fletching.Top := 177;
Fletching.Width := 75;
Fletching.Height := 25;
Fletching.Caption := 'Fletching';
Fletching.TabOrder := 11;
ItemPicker := TButton.Create(User_Info);
ItemPicker.Parent := User_Info;
ItemPicker.Left := 33;
ItemPicker.Top := 235;
ItemPicker.Width := 75;
ItemPicker.Height := 25;
ItemPicker.Caption := 'ItemPicker';
ItemPicker.TabOrder := 12;
FireMaker := TButton.Create(User_Info);
FireMaker.Parent := User_Info;
FireMaker.Left := 374;
FireMaker.Top := 56;
FireMaker.Width := 75;
FireMaker.Height := 25;
FireMaker.Caption := 'FireMaker';
FireMaker.TabOrder := 13;
Miner := TButton.Create(User_Info);
Miner.Parent := User_Info;
Miner.Left := 374;
Miner.Top := 115;
Miner.Width := 75;
Miner.Height := 25;
Miner.Caption := 'Miner';
Miner.TabOrder := 14;
Essence := TButton.Create(User_Info);
Essence.Parent := User_Info;
Essence.Left := 375;
Essence.Top := 175;
Essence.Width := 75;
Essence.Height := 25;
Essence.Caption := 'Essence';
Essence.TabOrder := 15;
Button8 := TButton.Create(User_Info);
Button8.Parent := User_Info;
Button8.Left := 375;
Button8.Top := 234;
Button8.Width := 75;
Button8.Height := 25;
Button8.Caption := 'Button8';
Button8.TabOrder := 16;
Start := TButton.Create(User_Info);
Start.OnClick :=@ButtonClick;
Start.Parent := User_Info;
Start.Left := 200;
Start.Top := 235;
Start.Width := 75;
Start.Height := 25;
Start.Caption := 'Start';
Start.TabOrder := 17;
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 263;
frmDesign.Height := 180;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 32;
Label1.Top := 40;
Label1.Width := 51;
Label1.Height := 13;
Label1.Caption := 'Username:';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 33;
Label2.Top := 65;
Label2.Width := 49;
Label2.Height := 13;
Label2.Caption := 'Password:';
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 93;
Edit1.Top := 37;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 93;
Edit2.Top := 62;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.PasswordChar:= '*';
Button1 := TButton.Create(frmDesign);
Button1.OnClick := @ButtonClick;
Button1.Parent := frmDesign;
Button1.Left := 79;
Button1.Top := 99;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start!';
Button1.TabOrder := 10;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure SafeInitotherForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
User_Info.ShowModal;
end;

procedure ShowotherFormModal;
begin
frmdesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

procedure SetupAll;
begin
Username1 := Edit1.Text;
Password1 := Edit2.Text;
end;

begin
SafeInitForm;
SafeShowFormModal;
FreeForm(User_Info); // Frees the form from memory.
SetupAll;
WriteLn('Username = ' + Username1);
Writeln('Password = ' + Password1);
end.