Ok, how i can get this running ? The progress bar by pressing the button ? heres my code :
SCAR Code:
program New;
var
frmDesign : TForm;
Label1 : TLabel;
ProgressBar1 : TProgressBar;
Button1 : TButton;
procedure LoadForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 356;
frmDesign.Top := 170;
frmDesign.Width := 268;
frmDesign.Height := 134;
frmDesign.Caption := 'Progress Bar Testing';
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 := 55;
Label1.Top := 26;
Label1.Width := 98;
Label1.Height := 13;
Label1.Caption := 'Progress Bar Testing';
ProgressBar1 := TProgressBar.Create(frmDesign);
ProgressBar1.Parent := frmDesign;
ProgressBar1.Left := 55;
ProgressBar1.Top := 40;
ProgressBar1.Width := 150;
ProgressBar1.Height := 17;
ProgressBar1.Smooth := True;
ProgressBar1.Step := 5;
ProgressBar1.TabOrder := 8;
ProgressBar1.TabStop := False;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 90;
Button1.Top := 65;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start The Bar';
Button1.TabOrder := 9;
end;
procedure TheForm;
var
v: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('LoadForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure TehForm;
var
v: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
TheForm;
TehForm;
FreeForm(frmDesign);
end.