Results 1 to 2 of 2

Thread: Form Problem

  1. #1
    Join Date
    Dec 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Form Problem

    Ok, so i am revamping pplsuqbawlz Graphical Reporter (i don't know if pplsuqbawlz is still active, if so srry for not asking). And i am building it up from scratch again. But now while i am making and testing the form it gives me a very weird error.

    This is the error:
    Code:
    Line 24: [Error] (24:8): Unknown identifier 'PARENT' in script
    And this is the Script:
    SCAR Code:
    program New;
    var
      Form1 : TForm;
      Timer1 : TTimer;
     
     
    procedure InitForm;
    begin
    Form1 := CreateForm;
    Form1.Left := 349;
    Form1.Top := 273;
    Form1.BorderStyle := bsDialog;
    Form1.Caption := 'Form1';
    Form1.ClientHeight := 190;
    Form1.ClientWidth := 320;
    Form1.Color := clMedGray;
    Form1.Font.Color := clWindowText;
    Form1.Font.Height := -13;
    Form1.Font.Name := 'Verdana';
    Form1.Font.Style := [fsBold];
    Form1.Visible := True;
    Form1.PixelsPerInch := 100;
    Timer1 := TTimer.Create(Form1);
    Timer1.Parent := Form1;
    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;

    begin
      SafeInitForm;
      SafeShowFormModal;
    end.

    Like you can see i doesn't know the parrent option


    PS: I am using Scar3.13Divi
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig (I did, so should u )

    http://www.fenjer.com/adnan/SRLStats/3907.png

  2. #2
    Join Date
    Jun 2006
    Location
    United Kingdom
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You dont need parent with timers i think. Example by freddy:

    Code:
    program TimerTest;
    
    var
      frmDesign: TForm;
      tmr1, tmr2: TTimer;
    
    procedure Timer1(sender: TObject);
    begin
      WriteLn('Timer1 looping!');
    end;
    
    procedure Timer2(sender: TObject);
    begin
      WriteLn('Timer2 looping!');
    end;
    
    procedure InitForm;
    begin
      frmDesign := CreateForm;
      frmDesign.Left := 259;
      frmDesign.Top := 132;
      frmDesign.Width := 354;
      frmDesign.Height := 254;
      frmDesign.Caption := 'Menu Testing Form';
      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;
    
      tmr1 := TTimer.Create(frmDesign);
      tmr1.Interval := 500;
      tmr1.OnTimer := @Timer1;
    
      tmr2 := TTimer.Create(frmDesign);
      tmr2.Interval := 1000;
      tmr2.OnTimer := @Timer2;
    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;
    
    begin
      SafeInitForm;
      SafeShowFormModal;
      FreeForm(frmDesign);
    end.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. crazy form problem
    By drizzt in forum OSR Help
    Replies: 4
    Last Post: 04-04-2008, 11:27 AM
  2. Form Problem
    By Macho Man67 in forum OSR Help
    Replies: 3
    Last Post: 11-15-2007, 04:04 AM
  3. Advanced Form Problem
    By samoates1112 in forum OSR Help
    Replies: 14
    Last Post: 05-14-2007, 02:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •