
Originally Posted by
Coh3n
Hmm, that's weird. I do exactly the same thing in my Draynor form and it works fine. Try loading the image before initializing the form (just load the image before the CreateForm line.
that's really weird, it still does nothing D:
SCAR Code:
program new;
{$i srl\srl.scar}
var
Form : TFORM;
labels : array [0..1] of array of TLabel;
edits : array [0..1] of array of TEdit;
combos : Array of TCOMBOBOX;
buttons : Array [0..3] of TButton;
v : Tvariantarray;
c : integer;
const
column_one = 0;
column_two = 1;
procedure ButtonClick(Sender: TObject);
begin
end;
procedure paint(Sender: TObject);
begin
DrawBitmap(c, form.CANVAS, 0, 0);
//freebitmap(c);
end;
procedure closeform(Sender: TObject);
begin
freebitmap(c);
end;
procedure init;
var
i, ii, iii : integer;
labelcaptions : array [0..1] of array of String;
combotexts : array[0..1] of array of String;
buttontexts : array of String;
begin
labelcaptions[column_one] :=
['Username:', 'Password:', 'Nick:', 'Pin:'];
labelcaptions[column_two] :=
['Loads:', 'Server:', 'Signed:', 'Action:'];
combotexts[0] := ['True', 'False'];
combotexts[1] := ['[Lumby] Spin Flax', '[LLetya] Pick Flax', '[Cammy] Pick Flax', '[Cammy] Spin Flax', '[Cammy] Both'];
buttontexts := ['Save', 'Load', 'Start', 'Stop'];
Form := CreateForm;
with Form do
begin
Caption := 'Awkward Epic Flaxer';
SetBounds(100, 100, 360, 200);
BorderStyle := BSToolWindow;
ONpaint:= @paint;
// ondestroy := @closeform;
end;
setarraylength(labels[column_one], 5);
for i := 1 to 4 do
begin
labels[column_one][i] := TLabel.Create(Form);
with labels[column_one][i] do
begin
Parent := Form;
caption := labelcaptions[column_one][i - 1];
left := 10;
top := i * 28;
end;
end;
setarraylength(labels[column_two], 5);
for i := 1 to 4 do
begin
labels[column_two][i] := TLabel.Create(Form);
with labels[column_two][i] do
begin
Parent := Form;
caption := labelcaptions[column_two][i - 1];
left := 200;
top := i * 28;
end;
end;
setarraylength(edits[column_one], 5);
for i := 1 to 4 do
begin
edits[column_one][i] := Tedit.Create(Form);
with edits[column_one][i] do
begin
Parent := Form;
Height := 30;
Width := 110;
left := 75;
top := i * 28;
end;
end;
setarraylength(edits[column_two], 3);
for i := 1 to 2 do
begin
edits[column_two][i] := Tedit.Create(Form);
with edits[column_two][i] do
begin
Parent := Form;
Height := 30;
Width := 110;
left := 250;
top := i * 28;
end;
end;
setarraylength(combos, 3);
for i := 1 to 2 do
begin
combos[i] := Tcombobox.Create(Form);
with combos[i] do
begin
Parent := Form;
Height := 30;
Width := 110;
left := 250;
top := 56 + i * 28;
if i = 1 then iii := 1 else iii := 4;
for II := 0 to iii do
Items.Add(ComboTexts[i - 1][ii]);
end;
end;
for I := 0 to 3 do
begin
Buttons[I] := TButton.Create(Form);
with Buttons[I] do
begin
Parent := Form;
height := 40;
width := 90;
left := i * 90;
top := 142;
Caption := buttontexts[i];
OnClick := @ButtonClick;
end;
end;
form.ShowModal;
form.Free;
end;
begin
c := LoadBitmap(ScriptPath + 'background.bmp');
ThreadSafeCall('init',v);
end.
if it helps :\
e : updated to the actual script