Hey, im having problems with my forms in Scar3.20. It wont show any images in forms. Here is the script:
SCAR Code:program New;
var
frmDesign : TForm;
Image1 : TImage;
Label0 : TLabel;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
Edit0 : TEdit;
Edit1 : TEdit;
Edit2 : TEdit;
ComboBox0 : TComboBox;
ComboBox1 : TComboBox;
ComboBox2 : TComboBox;
Button0 : TButton;
Button1 : TButton;
Button2 : TButton;
ListBox1 : TListBox;
Button3 : TButton;
Button4 : TButton;
Button5 : TButton;
procedure initform;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 463;
frmDesign.Height := 456;
frmDesign.Caption := 'SuperBatman'#39's Super Chinner V1.0';
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;
Image1 := TImage.Create(frmDesign);
Image1.Parent := frmDesign;
Image1.Left := 0;
Image1.Top := 0;
Image1.Width := 457;
Image1.Height := 145;
Label0 := TLabel.Create(frmDesign);
Label0.Parent := frmDesign;
Label0.Left := 24;
Label0.Top := 176;
Label0.Width := 51;
Label0.Height := 13;
Label0.Caption := 'Username:';
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 24;
Label1.Top := 208;
Label1.Width := 49;
Label1.Height := 13;
Label1.Caption := 'Password:';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 24;
Label2.Top := 240;
Label2.Width := 28;
Label2.Height := 13;
Label2.Caption := 'Nick: ';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 24;
Label3.Top := 272;
Label3.Width := 33;
Label3.Height := 13;
Label3.Caption := 'Active:';
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 24;
Label4.Top := 304;
Label4.Width := 51;
Label4.Height := 13;
Label4.Caption := 'Chin Color:';
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 24;
Label5.Top := 336;
Label5.Width := 30;
Label5.Height := 13;
Label5.Caption := 'Traps:';
Label6 := TLabel.Create(frmDesign);
Label6.Parent := frmDesign;
Label6.Left := 248;
Label6.Top := 176;
Label6.Width := 129;
Label6.Height := 13;
Label6.Caption := 'You currently have Players:';
Edit0 := TEdit.Create(frmDesign);
Edit0.Parent := frmDesign;
Edit0.Left := 80;
Edit0.Top := 176;
Edit0.Width := 121;
Edit0.Height := 21;
Edit0.TabOrder := 8;
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 80;
Edit1.Top := 208;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 9;
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 80;
Edit2.Top := 240;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 10;
ComboBox0 := TComboBox.Create(frmDesign);
ComboBox0.Parent := frmDesign;
ComboBox0.Left := 80;
ComboBox0.Top := 272;
ComboBox0.Width := 121;
ComboBox0.Height := 21;
ComboBox0.ItemHeight := 13;
ComboBox0.TabOrder := 11;
ComboBox0.Text := 'True';
ComboBox0.Items.Add('true');
ComboBox0.Items.Add('false');
ComboBox1 := TComboBox.Create(frmDesign);
ComboBox1.Parent := frmDesign;
ComboBox1.Left := 80;
ComboBox1.Top := 304;
ComboBox1.Width := 121;
ComboBox1.Height := 21;
ComboBox1.ItemHeight := 13;
ComboBox1.TabOrder := 12;
ComboBox1.Text := 'Red';
ComboBox1.Items.Add('Red');
ComboBox1.Items.Add('Grey');
ComboBox2 := TComboBox.Create(frmDesign);
ComboBox2.Parent := frmDesign;
ComboBox2.Left := 80;
ComboBox2.Top := 336;
ComboBox2.Width := 121;
ComboBox2.Height := 21;
ComboBox2.ItemHeight := 13;
ComboBox2.TabOrder := 13;
ComboBox2.Text := '3';
ComboBox2.Items.Add('3');
ComboBox2.Items.Add('4');
ComboBox2.Items.Add('5');
Button0 := TButton.Create(frmDesign);
Button0.Parent := frmDesign;
Button0.Left := 224;
Button0.Top := 312;
Button0.Width := 75;
Button0.Height := 25;
Button0.Caption := 'Add Player';
Button0.TabOrder := 14;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 328;
Button1.Top := 312;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'New Players';
Button1.TabOrder := 15;
Button2 := TButton.Create(frmDesign);
Button2.Parent := frmDesign;
Button2.Left := 280;
Button2.Top := 344;
Button2.Width := 75;
Button2.Height := 25;
Button2.Caption := 'Save Players';
Button2.TabOrder := 16;
ListBox1 := TListBox.Create(frmDesign);
ListBox1.Parent := frmDesign;
ListBox1.Left := 256;
ListBox1.Top := 200;
ListBox1.Width := 121;
ListBox1.Height := 97;
ListBox1.ItemHeight := 13;
ListBox1.TabOrder := 17;
Button3 := TButton.Create(frmDesign);
Button3.Parent := frmDesign;
Button3.Left := 48;
Button3.Top := 384;
Button3.Width := 145;
Button3.Height := 25;
Button3.Caption := 'Edit Trap Tiles';
Button3.TabOrder := 18;
Button4 := TButton.Create(frmDesign);
Button4.Parent := frmDesign;
Button4.Left := 224;
Button4.Top := 384;
Button4.Width := 75;
Button4.Height := 25;
Button4.Caption := 'Start';
Button4.TabOrder := 19;
Button5 := TButton.Create(frmDesign);
Button5.Parent := frmDesign;
Button5.Left := 328;
Button5.Top := 384;
Button5.Width := 75;
Button5.Height := 25;
Button5.Caption := 'Exit';
Button5.TabOrder := 20;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
Procedure OpenForm;
begin
SafeInitForm;
SafeShowFormModal;
end;
begin
Openform;
end.
I looked at the image part and noticed:
It looks like all its doing is making a box. I would put in the actual image part manually if i knew what to call, but i dont.Code:Image1 := TImage.Create(frmDesign); Image1.Parent := frmDesign; Image1.Left := 0; Image1.Top := 0; Image1.Width := 457; Image1.Height := 145;
Any suggestions/know what to call in the imag1 part?



Reply With Quote




. You don't need an include file. You can also use my image downloader function.





