Brandon
07-28-2011, 03:22 AM
For the life of me I cannot figure out why simba crashes and leaves the form on my screen still.. then it doesn't respond :S
Not sure if its a bug or not..
Its a form for simba.. Try compiling it :c
var
Form : TForm;
GroupBox1: TGroupBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Form_OnMouseDown(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer);
var
mX, mY, fX, fY, sX, sY : Integer;
begin
fX := Form.Left;
fY := Form.Top;
GetMousePos(sX, sY);
IsMouseButtonDown(Mouse_Left); // Free the buffer
case Sender of
Form:
while IsMouseButtonDown(Mouse_Left) do
begin
GetMousePos(mX, mY);
Form.Left := fX - (sX - mX);
Form.Top := fY - (sY - mY);
Wait(1);
end;
end;
end;
Procedure Click(Sender: TObject);
begin
Form.CLOSE;
end;
procedure InitForm;
begin
Form := TForm.Create(nil);
with Form do
begin
GroupBox1 := TGroupBox.Create(Form);
CheckBox1 := TCheckBox.Create(GroupBox1);
CheckBox2 := TCheckBox.Create(GroupBox1);
CheckBox3 := TCheckBox.Create(GroupBox1);
CheckBox4 := TCheckBox.Create(GroupBox1);
CheckBox5 := TCheckBox.Create(GroupBox1);
CheckBox6 := TCheckBox.Create(GroupBox1);
CheckBox7 := TCheckBox.Create(GroupBox1);
CheckBox8 := TCheckBox.Create(GroupBox1);
Button1 := TButton.Create(GroupBox1);
Button2 := TButton.Create(GroupBox1);
Button3 := TButton.Create(GroupBox1);
Button4 := TButton.Create(Form);
BorderStyle := bsNone;
OnMouseDown := @Form_OnMouseDown;
Left := 384;
Top := 178;
BorderStyle := bsNone;
Caption := 'Form1';
ClientHeight := 128;
ClientWidth := 505;
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Tahoma';
Font.Style := [];
PixelsPerInch := 96;
OnMouseDown := @Form_OnMouseDown;
with GroupBox1 do
begin
Parent := Form;
Left := 7;
Top := 8;
Width := 491;
Height := 111;
Caption := 'Fungi Collector v1.3 ~ Ggzz';
TabOrder := 0;
end;
with CheckBox1 do
begin
Parent := GroupBox1;
Left := 18;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Log-1 Location';
TabOrder := 0;
OnClick:= @Click;
end;
with CheckBox2 do
begin
Parent := GroupBox1;
Left := 154;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Logs-2 Location';
TabOrder := 1;
OnClick:= @Click;
end;
with CheckBox3 do
begin
Parent := GroupBox1;
Left := 283;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Disable Warning';
TabOrder := 2;
OnClick:= @Click;
end;
with CheckBox4 do
begin
Parent := GroupBox1;
Left := 394;
Top := 5;
Width := 97;
Height := 17;
Caption := 'DungeonPortal';
TabOrder := 3;
OnClick:= @Click;
end;
with CheckBox5 do
begin
Parent := GroupBox1;
Left := 18;
Top := 40;
Width := 97;
Height := 17;
Caption := 'DungeonAltar';
TabOrder := 4;
OnClick:= @Click;
end;
with CheckBox6 do
begin
Parent := GroupBox1;
Left := 154;
Top := 40;
Width := 97;
Height := 17;
Caption := 'Attach GUI To Smart';
TabOrder := 5;
OnClick:= @Click;
end;
with Button1 do
begin
Parent := GroupBox1;
Left := 18;
Top := 70;
Width := 75;
Height := 21;
Caption := 'Check Settings';
TabOrder := 8;
OnClick := @Click;
end;
with Button2 do
begin
Parent := GroupBox1;
Left := 217;
Top := 70;
Width := 75;
Height := 22;
Caption := 'Pause Script';
TabOrder := 9;
OnClick := @Click;
end;
with Button3 do
begin
Parent := GroupBox1;
Left := 394;
Top := 70;
Width := 75;
Height := 21;
Caption := 'Destroy GUI';
TabOrder := 10;
OnClick := @Click;
end;
with Button4 do
begin
Parent := Form;
Left := 486;
Top := 0;
Width := 19;
Height := 19;
Caption := 'x';
ParentShowHint := False;
ShowHint := False;
TabOrder := 1;
OnClick := @Click;
end;
end;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
Form.Show;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
try
SafeInitForm;
SafeShowFormModal;
except
finally
Form.Free;
end;
end.
Not sure if its a bug or not..
Its a form for simba.. Try compiling it :c
var
Form : TForm;
GroupBox1: TGroupBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Form_OnMouseDown(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer);
var
mX, mY, fX, fY, sX, sY : Integer;
begin
fX := Form.Left;
fY := Form.Top;
GetMousePos(sX, sY);
IsMouseButtonDown(Mouse_Left); // Free the buffer
case Sender of
Form:
while IsMouseButtonDown(Mouse_Left) do
begin
GetMousePos(mX, mY);
Form.Left := fX - (sX - mX);
Form.Top := fY - (sY - mY);
Wait(1);
end;
end;
end;
Procedure Click(Sender: TObject);
begin
Form.CLOSE;
end;
procedure InitForm;
begin
Form := TForm.Create(nil);
with Form do
begin
GroupBox1 := TGroupBox.Create(Form);
CheckBox1 := TCheckBox.Create(GroupBox1);
CheckBox2 := TCheckBox.Create(GroupBox1);
CheckBox3 := TCheckBox.Create(GroupBox1);
CheckBox4 := TCheckBox.Create(GroupBox1);
CheckBox5 := TCheckBox.Create(GroupBox1);
CheckBox6 := TCheckBox.Create(GroupBox1);
CheckBox7 := TCheckBox.Create(GroupBox1);
CheckBox8 := TCheckBox.Create(GroupBox1);
Button1 := TButton.Create(GroupBox1);
Button2 := TButton.Create(GroupBox1);
Button3 := TButton.Create(GroupBox1);
Button4 := TButton.Create(Form);
BorderStyle := bsNone;
OnMouseDown := @Form_OnMouseDown;
Left := 384;
Top := 178;
BorderStyle := bsNone;
Caption := 'Form1';
ClientHeight := 128;
ClientWidth := 505;
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Tahoma';
Font.Style := [];
PixelsPerInch := 96;
OnMouseDown := @Form_OnMouseDown;
with GroupBox1 do
begin
Parent := Form;
Left := 7;
Top := 8;
Width := 491;
Height := 111;
Caption := 'Fungi Collector v1.3 ~ Ggzz';
TabOrder := 0;
end;
with CheckBox1 do
begin
Parent := GroupBox1;
Left := 18;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Log-1 Location';
TabOrder := 0;
OnClick:= @Click;
end;
with CheckBox2 do
begin
Parent := GroupBox1;
Left := 154;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Logs-2 Location';
TabOrder := 1;
OnClick:= @Click;
end;
with CheckBox3 do
begin
Parent := GroupBox1;
Left := 283;
Top := 5;
Width := 97;
Height := 17;
Caption := 'Disable Warning';
TabOrder := 2;
OnClick:= @Click;
end;
with CheckBox4 do
begin
Parent := GroupBox1;
Left := 394;
Top := 5;
Width := 97;
Height := 17;
Caption := 'DungeonPortal';
TabOrder := 3;
OnClick:= @Click;
end;
with CheckBox5 do
begin
Parent := GroupBox1;
Left := 18;
Top := 40;
Width := 97;
Height := 17;
Caption := 'DungeonAltar';
TabOrder := 4;
OnClick:= @Click;
end;
with CheckBox6 do
begin
Parent := GroupBox1;
Left := 154;
Top := 40;
Width := 97;
Height := 17;
Caption := 'Attach GUI To Smart';
TabOrder := 5;
OnClick:= @Click;
end;
with Button1 do
begin
Parent := GroupBox1;
Left := 18;
Top := 70;
Width := 75;
Height := 21;
Caption := 'Check Settings';
TabOrder := 8;
OnClick := @Click;
end;
with Button2 do
begin
Parent := GroupBox1;
Left := 217;
Top := 70;
Width := 75;
Height := 22;
Caption := 'Pause Script';
TabOrder := 9;
OnClick := @Click;
end;
with Button3 do
begin
Parent := GroupBox1;
Left := 394;
Top := 70;
Width := 75;
Height := 21;
Caption := 'Destroy GUI';
TabOrder := 10;
OnClick := @Click;
end;
with Button4 do
begin
Parent := Form;
Left := 486;
Top := 0;
Width := 19;
Height := 19;
Caption := 'x';
ParentShowHint := False;
ShowHint := False;
TabOrder := 1;
OnClick := @Click;
end;
end;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
Form.Show;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
try
SafeInitForm;
SafeShowFormModal;
except
finally
Form.Free;
end;
end.