This error plagues me:
[Runtime Error] : Exception: Cannot make a visible window modal in line 198 in script
I've even tried it with a form that I know works... >.< I'm stumped.
Code:program KaraVision; var frmDesign : TForm; Panel1 : TPanel; Label1 : TLabel; Bevel1 : TBevel; Bevel2 : TBevel; Label3 : TLabel; Bevel3 : TBevel; Label2 : TLabel; CheckBox2 : TCheckBox; CheckBox3 : TCheckBox; CheckBox1 : TCheckBox; CheckBox4 : TCheckBox; Button1 : TButton; CheckBox5 : TCheckBox; CheckBox6 : TCheckBox; CheckBox7 : TCheckBox; EditBox1 : TEdit; procedure KaraForm; begin; frmDesign := CreateForm; frmDesign.Left := 257; frmDesign.Top := 114; frmDesign.Width := 376; frmDesign.Height := 346; 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 := True; frmDesign.PixelsPerInch := 96; Panel1 := TPanel.Create(frmDesign); Panel1.Parent := frmDesign; Panel1.Left := 88; Panel1.Top := 72; Panel1.Width := 209; Panel1.Height := 161; Panel1.Caption := 'Panel1'; Panel1.TabOrder := 0; Label1 := TLabel.Create(Panel1); Label1.Parent := Panel1; Label1.Left := 16; Label1.Top := 8; Label1.Width := 58; Label1.Height := 20; Label1.Alignment := taCenter; Label1.Caption := 'Banking'; Label1.Font.Color := clWindowText; Label1.Font.Height := -17; Label1.Font.Name := 'MS Sans Serif'; Label1.Font.Style := []; Label1.ParentFont := False; Bevel1 := TBevel.Create(Panel1); Bevel1.Parent := Panel1; Bevel1.Left := 8; Bevel1.Top := 8; Bevel1.Width := 73; Bevel1.Height := 121; Bevel2 := TBevel.Create(Panel1); Bevel2.Parent := Panel1; Bevel2.Left := 96; Bevel2.Top := 8; Bevel2.Width := 105; Bevel2.Height := 73; Label3 := TLabel.Create(Panel1); Label3.Parent := Panel1; Label3.Left := 96; Label3.Top := 8; Label3.Width := 105; Label3.Height := 20; Label3.Alignment := taCenter; Label3.Caption := 'Fish'; Label3.Font.Color := clWindowText; Label3.Font.Height := -17; Label3.Font.Name := 'MS Sans Serif'; Label3.Font.Style := []; Label3.ParentFont := False; Bevel3 := TBevel.Create(Panel1); Bevel3.Parent := Panel1; Bevel3.Left := 96; Bevel3.Top := 96; Bevel3.Width := 105; Bevel3.Height := 57; Label2 := TLabel.Create(Panel1); Label2.Parent := Panel1; Label2.Left := 96; Label2.Top := 96; Label2.Width := 105; Label2.Height := 20; Label2.Alignment := taCenter; Label2.Caption := 'Loads'; Label2.Font.Color := clWindowText; Label2.Font.Height := -17; Label2.Font.Name := 'MS Sans Serif'; Label2.Font.Style := []; Label2.ParentFont := False; CheckBox2 := TCheckBox.Create(Panel1); CheckBox2.Parent := Panel1; CheckBox2.Left := 16; CheckBox2.Top := 32; CheckBox2.Width := 81; CheckBox2.Height := 17; CheckBox2.Caption := 'Tzar'; CheckBox2.TabOrder := 0; CheckBox3 := TCheckBox.Create(Panel1); CheckBox3.Parent := Panel1; CheckBox3.Left := 16; CheckBox3.Top := 80; CheckBox3.Width := 81; CheckBox3.Height := 17; CheckBox3.Caption := 'Sell'; CheckBox3.TabOrder := 1; CheckBox1 := TCheckBox.Create(Panel1); CheckBox1.Parent := Panel1; CheckBox1.Left := 16; CheckBox1.Top := 56; CheckBox1.Width := 81; CheckBox1.Height := 17; CheckBox1.Caption := 'Draynor'; CheckBox1.TabOrder := 2; CheckBox4 := TCheckBox.Create(Panel1); CheckBox4.Parent := Panel1; CheckBox4.Left := 16; CheckBox4.Top := 104; CheckBox4.Width := 81; CheckBox4.Height := 17; CheckBox4.Caption := 'Drop'; CheckBox4.TabOrder := 3; Button1 := TButton.Create(Panel1); Button1.Parent := Panel1; Button1.Left := 16; Button1.Top := 136; Button1.Width := 57; Button1.Height := 17; Button1.Caption := 'Begin!'; Button1.TabOrder := 4; CheckBox5 := TCheckBox.Create(Panel1); CheckBox5.Parent := Panel1; CheckBox5.Left := 112; CheckBox5.Top := 32; CheckBox5.Width := 81; CheckBox5.Height := 17; CheckBox5.Caption := 'Lobby Cage'; CheckBox5.TabOrder := 5; CheckBox6 := TCheckBox.Create(Panel1); CheckBox6.Parent := Panel1; CheckBox6.Left := 488; CheckBox6.Top := 88; CheckBox6.Width := 7; CheckBox6.Height := 1; CheckBox6.Caption := 'Harpoon'; CheckBox6.TabOrder := 6; CheckBox7 := TCheckBox.Create(Panel1); CheckBox7.Parent := Panel1; CheckBox7.Left := 112; CheckBox7.Top := 56; CheckBox7.Width := 81; CheckBox7.Height := 17; CheckBox7.Caption := 'Harpoon'; CheckBox7.TabOrder := 7; EditBox1 := TEdit.Create(Panel1); EditBox1.Parent := Panel1; EditBox1.Left := 104; EditBox1.Top := 128; EditBox1.Width := 89; EditBox1.Height := 21; EditBox1.TabOrder := 8; end; procedure ShowForm; var v: TVariantArray; begin setarraylength(V, 0); ThreadSafeCall('KaraForm', v); end; procedure ShowformModal; begin frmDesign.ShowModal; end; procedure SafeShowModal; var v: TVariantArray; begin setarraylength(V, 0); ThreadSafeCall('ShowformModal', v); end; Begin ShowForm; SafeShowModal; end.



Reply With Quote


