Results 1 to 13 of 13

Thread: Form Help

  1. #1
    Join Date
    Jul 2009
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Form Help

    I have 2 Forms. One opens up on start, and if you click on a button the other is suppose to show up.
    How would i make another form show up on click?
    Quote Originally Posted by Cstrike View Post
    Why do I even try these things? I just shit my pants over this god damn tutorial. Fuck, that's uncleanable. I can't even wash that out because there's so much of my shit it will just stain everything else. If I put it in the washing machine, I'm sure to stain the sides.

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Button1.OnClick := SecondForm;
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've sent this to him already, but here's a crappy little example I made.

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Just do FORM.ShowModal;

    BUT, you can't use the first form until the second is closed. Check out the instructions window with my abyssal crafter form.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Just do FORM.ShowModal;

    BUT, you can't use the first form until the second is closed. Check out the instructions window with my abyssal crafter form.
    Or you could do the button click and change every setting on the previous form... as long as they had the same amount of components(if using arrays).

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    Or you could do the button click and change every setting on the previous form... as long as they had the same amount of components(if using arrays).
    This is true, thats what I do for tabs. But that isn't always the best idea. Sometimes you want that extra window there because of ease of use.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    This is true, thats what I do for tabs. But that isn't always the best idea. Sometimes you want that extra window there because of ease of use.
    Ya I used two forms with my Minotaur killer... as soon as method finishes his fun work, I can finish and release that script.

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Just do FORM.ShowModal;

    BUT, you can't use the first form until the second is closed.
    That's the beauty of ShowModal

    Only if SCAR could support the Show; procedure properly...
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  9. #9
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    That's the beauty of ShowModal

    Only if SCAR could support the Show; procedure properly...
    How do you mean? SCAR can allow you to switch between 2 forms.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  10. #10
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    How do you mean? SCAR can allow you to switch between 2 forms.
    How would you go about doing that?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Nava:

    SCAR Code:
    program New;

    Procedure MainClick(Sender2 : TObject); Forward; // Main Menu

    Procedure Click(Sender : TObject); Forward; //Nerd test/ Horoscope

    Procedure Assign(Sender1 : TObject); Forward; //Calculator


    Const FastScript = True; //True for Speed, False for Normal

    {-------------------------}
    { N3rd t3st Begins Here   }
    {-------------------------}

    Var Value : Integer;
    Captcha1, Captcha2 : Integer;
    Calculation : String; //calculator vars

    var
      // results variables.
      frmDesign3 : TForm;
      GroupBox11, GroupBox12 : TGroupBox;
      Memo4, Memo5, Memo6 : TMemo;
      Button_1 : TButton;

    // This form was parsed using: DFM Form Parser v.25 by Ron.
    procedure results;
    var
      Timeresults : Integer;
    begin
      Timeresults := GetSystemTime;
      frmDesign3 := CreateForm;
      with frmDesign3 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 260;
        ClientHeight := 134;
        Caption := '+=+= N3rd T3st Marks =+=';
        Color := 5000447;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox11 := TGroupBox.Create(frmDesign3);
      with GroupBox11 do
      begin
        Parent := frmDesign3;
        Left := 0;
        Top := 0;
        Width := 257;
        Height := 129;
        Caption :=
          '                             Test Result!                       ' +
          '        '
        TabOrder := 0;
      end;
      GroupBox12 := TGroupBox.Create(GroupBox11);
      with GroupBox12 do
      begin
        Parent := GroupBox11;
        Left := 8;
        Top := 24;
        Width := 89;
        Height := 97;
        Caption := 'Are you ready?';
        TabOrder := 0;
      end;
      Memo4 := TMemo.Create(GroupBox12);
      with Memo4 do
      begin
        Parent := GroupBox12;
        Left := 8;
        Top := 16;
        Width := 73;
        Height := 49;
        with Memo4.Lines do
        begin
          Add('Now Time for ');
          Add('your Test ');
          Add('Result !!');
        end;
        TabOrder := 0;
      end;
      Button_1 := TButton.Create(GroupBox12);
      with Button_1 do
      begin
        Parent := GroupBox12;
        Left := 8;
        Top := 72;
        Width := 73;
        Height := 17;
        Caption := 'What I Get?';
        TabOrder := 1;
        OnClick := @Click;
      end;
      Memo5 := TMemo.Create(GroupBox11);
      with Memo5 do
      begin
        Parent := GroupBox11;
        Left := 112;
        Top := 32;
        Width := 137;
        Height := 33;
        with Memo5.Lines do
        begin
          Add('Your Score Is : ');
        end;
        TabOrder := 1;
      end;
      Memo6 := TMemo.Create(GroupBox11);
      with Memo6 do
      begin
        Parent := GroupBox11;
        Left := 112;
        Top := 72;
        Width := 137;
        Height := 49;
        TabOrder := 2;
      end;
      WriteLn('results compiled in ' + IntToStr(GetSystemTime - Timeresults) + ' milliseconds!');
    end;

    procedure Saferesults;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('results', V);
    end;

    procedure ShowresultsModal;
    begin
      frmDesign3.ShowModal;
    end;

    procedure SafeShowresultsModal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowresultsModal', V);
    end;

    procedure Mainresults;
    begin
      try
        Saferesults;
        SafeShowresultsModal;
      finally
        FreeForm(frmDesign3);
      except
        WriteLn('An error seems to have occurred in: results');
      end;
    end;


    var
      // Page1 variables.
      frmDesign : TForm;
      GroupBox1, GroupBox2, GroupBox3 : TGroupBox;
      Edit1 : TEdit;
      MoreThan6hrsonRS, EnjoyDnd, CorrectProfessor, CheckBox5,
      thrusfrisatProgramin : TCheckBox;
      Label1, Label2 : TLabel;
      Worddescribeyou, pplinspireyou : TComboBox;
      NextPage_1 : TButton;
      Memo1 : TMemo;

    // This form was parsed using DFM Form Parser v.26c Beta by Ron.
    // Generated from comp 3.5 Page 1.dfm.
    procedure Page1;
    var
      TimePage1 : Integer;
    begin
      TimePage1 := GetSystemTime;
      frmDesign := CreateForm;
      with frmDesign do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 335;
        ClientHeight := 333;
        Caption := '+=+=+=+ N3rd T3st - Page 1 +=+=+=+';
        Color := 6914286;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox1 := TGroupBox.Create(frmDesign);
      with GroupBox1 do
      begin
        Parent := frmDesign;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 329;
        TabOrder := 0;
      end;
      Edit1 := TEdit.Create(GroupBox1);
      with Edit1 do
      begin
        Parent := GroupBox1;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 21;
        TabOrder := 0;
        Text :=
          'Welcome to The N3rd Test --------- Find Out How N3rdy you really' +
          ' are !'
      end;
      GroupBox2 := TGroupBox.Create(GroupBox1);
      with GroupBox2 do
      begin
        Parent := GroupBox1;
        Left := 8;
        Top := 32;
        Width := 321;
        Height := 121;
        Caption := '       Part A) Questions!';
        TabOrder := 1;
      end;
      MoreThan6hrsonRS := TCheckBox.Create(GroupBox2);
      with MoreThan6hrsonRS do
      begin
        Parent := GroupBox2;
        Left := 16;
        Top := 24;
        Width := 249;
        Height := 17;
        Caption := 'Do you spend more than 6 hours on runescape?';
        TabOrder := 0;
      end;
      EnjoyDnd := TCheckBox.Create(GroupBox2);
      with EnjoyDnd do
      begin
        Parent := GroupBox2;
        Left := 16;
        Top := 48;
        Width := 281;
        Height := 17;
        Caption := 'Do you enjoy playing on D n D (Dungeons n Dragons) ?';
        TabOrder := 1;
      end;
      CorrectProfessor := TCheckBox.Create(GroupBox2);
      with CorrectProfessor do
      begin
        Parent := GroupBox2;
        Left := 16;
        Top := 72;
        Width := 281;
        Height := 17;
        Caption := 'Have you ever corrected a professor in lecture? ';
        TabOrder := 2;
      end;
      CheckBox5 := TCheckBox.Create(GroupBox2);
      with CheckBox5 do
      begin
        Parent := GroupBox2;
        Left := 16;
        Top := 104;
        Width := 1;
        Height := 1;
        Caption := 'CheckBox5';
        TabOrder := 3;
      end;
      thrusfrisatProgramin := TCheckBox.Create(GroupBox2);
      with thrusfrisatProgramin do
      begin
        Parent := GroupBox2;
        Left := 16;
        Top := 96;
        Width := 305;
        Height := 17;
        Caption := 'Have you spent Thursday, Friday and Saturday Programming';
        TabOrder := 4;
      end;
      GroupBox3 := TGroupBox.Create(GroupBox1);
      with GroupBox3 do
      begin
        Parent := GroupBox1;
        Left := 8;
        Top := 160;
        Width := 321;
        Height := 113;
        Caption := '  Part B) Questions!';
        TabOrder := 2;
      end;
      Label1 := TLabel.Create(GroupBox3);
      with Label1 do
      begin
        Parent := GroupBox3;
        Left := 16;
        Top := 24;
        Width := 224;
        Height := 13;
        Caption := 'Which Of These Words Describe you the best?';
      end;
      Label2 := TLabel.Create(GroupBox3);
      with Label2 do
      begin
        Parent := GroupBox3;
        Left := 16;
        Top := 64;
        Width := 225;
        Height := 13;
        Caption := 'Which one of these people Inspire you the most';
      end;
      Worddescribeyou := TComboBox.Create(GroupBox3);
      with Worddescribeyou do
      begin
        Parent := GroupBox3;
        Left := 16;
        Top := 40;
        Width := 289;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 0;
        Text := 'Click Here';
        with Items do
        begin
          Add('I sometimes lose sleep over a Computer Game');
          Add('I write my own plugins for enjoyment');
          Add('I can work out my IP using a NotePad and pencil');
          Add('I Have sometimes laughed at a joke written in a Science Daily');
        end;
      end;
      pplinspireyou := TComboBox.Create(GroupBox3);
      with pplinspireyou do
      begin
        Parent := GroupBox3;
        Left := 16;
        Top := 80;
        Width := 289;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 1;
        Text := 'Click Here';
        with Items do
        begin
          Add('Albert Einstein');
          Add('Bill Gates');
          Add('Issac Newton');
          Add('Pythagoras');
        end;
      end;
      NextPage_1 := TButton.Create(GroupBox1);
      with NextPage_1 do
      begin
        Parent := GroupBox1;
        Left := 232;
        Top := 280;
        Width := 97;
        Height := 41;
        Caption := 'Next Page -->';
        TabOrder := 3;
        OnClick := @Click;
      end;
      Memo1 := TMemo.Create(GroupBox1);
      with Memo1 do
      begin
        Parent := GroupBox1;
        Left := 16;
        Top := 280;
        Width := 193;
        Height := 49;
        with Lines do
        begin
          Add('Fun Fact : Did you know that the first ');
          Add('programming language invented was ');
          Add('hand tuned Assembly ?');
        end;
        TabOrder := 4;
      end;
      WriteLn('Page1 compiled in ' + IntToStr(GetSystemTime - TimePage1) + ' milliseconds!');
    end;

    procedure SafePage1;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('Page1', v);
    end;

    procedure ShowPage1Modal;
    begin
      frmDesign.ShowModal;
    end;

    procedure SafeShowPage1Modal;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowPage1Modal', v);
    end;

    procedure MainPage1;
    begin
      try
        SafePage1;
        SafeShowPage1Modal;
      except
        WriteLn('An error seems to have occurred in: Page1');
      end;
    end;

    var
      // Page2 variables.
      frmDesign1 : TForm;
      GroupBox4, GroupBox5, GroupBox6 : TGroupBox;
      Label3, Label4, Label5, Label6,
      Label7, Label_7, Label8 : TLabel;
      piwhatusay : TComboBox;
      billgates, oprah, thecomp, yomamma,
      akitten, ASNAKE, INTELQ450 : TRadioButton;
      Edit3, Edit2 : TEdit;
      NextPage_2, PreviousPage_2 : TButton;
      ScrollBar1, ScrollBar2 : TScrollBar;

    // This form was parsed using DFM Form Parser v.26c Beta by Ron.
    // Generated from comp 3.5 Page 2.dfm.
    procedure Page2;
    var
      TimePage2 : Integer;
    begin
      TimePage2 := GetSystemTime;
      frmDesign1 := CreateForm;
      with frmDesign1 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 336;
        ClientHeight := 330;
        Caption := '=+=+=+=+ N3rd T3st - Page 2 +=+=+=';
        Color := 6914286;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox4 := TGroupBox.Create(frmDesign1);
      with GroupBox4 do
      begin
        Parent := frmDesign1;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 329;
        TabOrder := 0;
      end;
      GroupBox5 := TGroupBox.Create(GroupBox4);
      with GroupBox5 do
      begin
        Parent := GroupBox4;
        Left := 8;
        Top := 32;
        Width := 321;
        Height := 121;
        Caption := '       Part C) Questions!';
        TabOrder := 1;
      end;
      Label3 := TLabel.Create(GroupBox5);
      with Label3 do
      begin
        Parent := GroupBox5;
        Left := 8;
        Top := 24;
        Width := 312;
        Height := 13;
        Caption := 'If someone said that pi was 3.1.. and stopped what would you do?';
      end;
      Label4 := TLabel.Create(GroupBox5);
      with Label4 do
      begin
        Parent := GroupBox5;
        Left := 8;
        Top := 64;
        Width := 258;
        Height := 13;
        Caption := 'If you had a choice to save someone who would it be?';
      end;
      piwhatusay := TComboBox.Create(GroupBox5);
      with piwhatusay do
      begin
        Parent := GroupBox5;
        Left := 8;
        Top := 40;
        Width := 265;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 0;
        Text := 'Click Here';
        with Items do
        begin
          Add('3.141 correct to 3 decimal places. Sir *smile like a nerd*');
          Add('I need to go to the bathroom');
          Add('I like pie');
          Add('*wake up* uhh the answer was 45');
        end;
      end;
      billgates := TRadioButton.Create(GroupBox5);
      with billgates do
      begin
        Parent := GroupBox5;
        Left := 8;
        Top := 80;
        Width := 113;
        Height := 17;
        Caption := 'Bill Gates';
        TabOrder := 1;
      end;
      oprah := TRadioButton.Create(GroupBox5);
      with oprah do
      begin
        Parent := GroupBox5;
        Left := 88;
        Top := 80;
        Width := 113;
        Height := 17;
        Caption := 'Oprah';
        TabOrder := 2;
      end;
      thecomp := TRadioButton.Create(GroupBox5);
      with thecomp do
      begin
        Parent := GroupBox5;
        Left := 160;
        Top := 80;
        Width := 113;
        Height := 17;
        Caption := 'The Computer';
        TabOrder := 3;
      end;
      yomamma := TRadioButton.Create(GroupBox5);
      with yomamma do
      begin
        Parent := GroupBox5;
        Left := 80;
        Top := 96;
        Width := 113;
        Height := 17;
        Caption := 'Your mom (:p )';
        TabOrder := 4;
      end;
      GroupBox6 := TGroupBox.Create(GroupBox4);
      with GroupBox6 do
      begin
        Parent := GroupBox4;
        Left := 8;
        Top := 160;
        Width := 321;
        Height := 113;
        Caption := '  Part D) Questions!';
        TabOrder := 2;
      end;
      Label5 := TLabel.Create(GroupBox6);
      with Label5 do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 16;
        Width := 166;
        Height := 13;
        Caption := 'What pet do you dream of owning?';
      end;
      Label6 := TLabel.Create(GroupBox6);
      with Label6 do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 56;
        Width := 159;
        Height := 13;
        Caption := 'Complete the following sentence :';
      end;
      Label7 := TLabel.Create(GroupBox6);
      with Label7 do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 88;
        Width := 3;
        Height := 13;
      end;
      Label_7 := TLabel.Create(GroupBox6);
      with Label_7 do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 72;
        Width := 278;
        Height := 13;
        Caption := #39'Random Access Memory can also be written as how much';
      end;
      Label8 := TLabel.Create(GroupBox6);
      with Label8 do
      begin
        Parent := GroupBox6;
        Left := 88;
        Top := 96;
        Width := 125;
        Height := 13;
        Caption := 'you have in your computer';
      end;
      akitten := TRadioButton.Create(GroupBox6);
      with akitten do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 32;
        Width := 65;
        Height := 17;
        Caption := 'A Kitten';
        TabOrder := 0;
      end;
      ASNAKE := TRadioButton.Create(GroupBox6);
      with ASNAKE do
      begin
        Parent := GroupBox6;
        Left := 88;
        Top := 32;
        Width := 65;
        Height := 17;
        Caption := 'A snake';
        TabOrder := 1;
      end;
      INTELQ450 := TRadioButton.Create(GroupBox6);
      with INTELQ450 do
      begin
        Parent := GroupBox6;
        Left := 160;
        Top := 32;
        Width := 97;
        Height := 17;
        Caption := 'An Intel Q450!!';
        TabOrder := 2;
      end;
      Edit3 := TEdit.Create(GroupBox6);
      with Edit3 do
      begin
        Parent := GroupBox6;
        Left := 16;
        Top := 88;
        Width := 65;
        Height := 21;
        TabOrder := 3;
      end;
      Edit2 := TEdit.Create(GroupBox4);
      with Edit2 do
      begin
        Parent := GroupBox4;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 21;
        TabOrder := 0;
        Text :=
          'Welcome to The N3rd Test --------- Find Out How N3rdy you really' +
          ' are !'
      end;
      NextPage_2 := TButton.Create(GroupBox4);
      with NextPage_2 do
      begin
        Parent := GroupBox4;
        Left := 232;
        Top := 280;
        Width := 97;
        Height := 41;
        Caption := 'Next Page -->';
        TabOrder := 3;
        OnClick := @Click;
      end;
      PreviousPage_2 := TButton.Create(GroupBox4);
      with PreviousPage_2 do
      begin
        Parent := GroupBox4;
        Left := 8;
        Top := 280;
        Width := 97;
        Height := 41;
        Caption := '<-- Previous Page';
        TabOrder := 4;
        OnClick := @Click;
      end;
      ScrollBar1 := TScrollBar.Create(GroupBox4);
      with ScrollBar1 do
      begin
        Parent := GroupBox4;
        Left := 112;
        Top := 304;
        Width := 113;
        Height := 17;
        PageSize := 0;
        TabOrder := 5;
      end;
      ScrollBar2 := TScrollBar.Create(GroupBox4);
      with ScrollBar2 do
      begin
        Parent := GroupBox4;
        Left := 112;
        Top := 280;
        Width := 113;
        Height := 17;
        PageSize := 0;
        TabOrder := 6;
      end;
      WriteLn('Page2 compiled in ' + IntToStr(GetSystemTime - TimePage2) + ' milliseconds!');
    end;

    procedure SafePage2;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('Page2', v);
    end;

    procedure ShowPage2Modal;
    begin
      frmDesign1.ShowModal;
    end;

    procedure SafeShowPage2Modal;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowPage2Modal', v);
    end;

    procedure MainPage2;
    begin
      try
        SafePage2;
        SafeShowPage2Modal;
      except
        WriteLn('An error seems to have occurred in: Page2');
      end;
    end;

    var
      // Page3 variables.
      frmDesign2 : TForm;
      GroupBox7, GroupBox8 : TGroupBox;
      Label10, Label11 : TLabel;
      Edit4 : TEdit;
      fortranproglanguage, Lispproglanguage, seualclimaxscripting : TCheckBox;
      RichEdit1 : TRichEdit;
      MarkTest_3, Previouspage_3 : TButton;
      ProgressBar1 : TProgressBar;

    // This form was parsed using DFM Form Parser v.26c Beta by Ron.
    // Generated from comp 3.5 Page 3.dfm.
    procedure Page3;
    var
      TimePage3 : Integer;
    begin
      TimePage3 := GetSystemTime;
      frmDesign2 := CreateForm;
      with frmDesign2 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 336;
        ClientHeight := 333;
        Caption := '+=+=+=+ N3rd T3st - Page 3 +=+=+=+';
        Color := 6914286;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox7 := TGroupBox.Create(frmDesign2);
      with GroupBox7 do
      begin
        Parent := frmDesign2;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 329;
        TabOrder := 0;
      end;
      Label10 := TLabel.Create(GroupBox7);
      with Label10 do
      begin
        Parent := GroupBox7;
        Left := 8;
        Top := 240;
        Width := 107;
        Height := 13;
        Caption := 'Processing Information';
      end;
      Label11 := TLabel.Create(GroupBox7);
      with Label11 do
      begin
        Parent := GroupBox7;
        Left := 32;
        Top := 256;
        Width := 56;
        Height := 13;
        Caption := 'Display Bar!';
      end;
      Edit4 := TEdit.Create(GroupBox7);
      with Edit4 do
      begin
        Parent := GroupBox7;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 21;
        TabOrder := 0;
        Text :=
          'Welcome to The N3rd Test --------- Find Out How N3rdy you really' +
          ' are !'
      end;
      GroupBox8 := TGroupBox.Create(GroupBox7);
      with GroupBox8 do
      begin
        Parent := GroupBox7;
        Left := 8;
        Top := 32;
        Width := 321;
        Height := 113;
        Caption := '  Part E) Questions!';
        TabOrder := 1;
      end;
      fortranproglanguage := TCheckBox.Create(GroupBox8);
      with fortranproglanguage do
      begin
        Parent := GroupBox8;
        Left := 16;
        Top := 24;
        Width := 289;
        Height := 17;
        Caption := 'Is FORTRAN a programming language?';
        TabOrder := 0;
      end;
      Lispproglanguage := TCheckBox.Create(GroupBox8);
      with Lispproglanguage do
      begin
        Parent := GroupBox8;
        Left := 16;
        Top := 56;
        Width := 209;
        Height := 17;
        Caption := 'Is Lisp a programming language?';
        TabOrder := 1;
      end;
      seualclimaxscripting := TCheckBox.Create(GroupBox8);
      with seualclimaxscripting do
      begin
        Parent := GroupBox8;
        Left := 16;
        Top := 88;
        Width := 305;
        Height := 17;
        Caption := 'Have you ever reached a sexual climax whilst programming?';
        TabOrder := 2;
      end;
      RichEdit1 := TRichEdit.Create(GroupBox7);
      with RichEdit1 do
      begin
        Parent := GroupBox7;
        Left := 8;
        Top := 152;
        Width := 321;
        Height := 73;
        with Lines do
        begin
          Add('This test was to see how much of a nerd you are. This wasn'#39't ');
          Add('meant to hurt anyone *cough cough* and certainly not to make ');
          Add('people happy. I hoped you enjoyed this test.');
          Add('Thank - you :)');
        end;
        TabOrder := 2;
      end;
      MarkTest_3 := TButton.Create(GroupBox7);
      with MarkTest_3 do
      begin
        Parent := GroupBox7;
        Left := 120;
        Top := 272;
        Width := 209;
        Height := 49;
        Caption := 'See how much of a nerd you really are?';
        TabOrder := 3;
        OnClick := @Click;
      end;
      Previouspage_3 := TButton.Create(GroupBox7);
      with Previouspage_3 do
      begin
        Parent := GroupBox7;
        Left := 8;
        Top := 272;
        Width := 97;
        Height := 49;
        Caption := '<-- Previous Page';
        TabOrder := 4;
        OnClick := @Click;
      end;
      ProgressBar1 := TProgressBar.Create(GroupBox7);
      with ProgressBar1 do
      begin
        Parent := GroupBox7;
        Left := 120;
        Top := 240;
        Width := 209;
        Height := 25;
        TabOrder := 5;
      end;
      WriteLn('Page3 compiled in ' + IntToStr(GetSystemTime - TimePage3) + ' milliseconds!');
    end;

    procedure SafePage3;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('Page3', v);
    end;

    procedure ShowPage3Modal;
    begin
      frmDesign2.ShowModal;
    end;

    procedure SafeShowPage3Modal;
    var
      v : TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowPage3Modal', v);
    end;

    procedure MainPage3;
    begin
      try
        SafePage3;
        SafeShowPage3Modal;
      except
        WriteLn('An error seems to have occurred in: Page3');
      end;
    end;

    Var
      Score : Integer;

    Procedure MarkTest;
    Begin
      Score := 50;
        Begin
          If MoreThan6hrsonRS.Checked Then
            Score := Score + 5
           else
            Score := Score -5;
        End;
         Begin
           If EnjoyDnd.Checked Then
             Score := Score + 5
           else
             Score := Score -5;
         end;
          Begin
            If CorrectProfessor.Checked Then
             Score := Score + 10
           else
             Score := Score -10;
         end;
          Begin
           If thrusfrisatProgramin.Checked Then
             Score := Score + 15
           else
             Score := Score - 15;
          end;
           Begin
             Case Worddescribeyou.text Of

               'I sometimes lose sleep over a Computer Game' : Score := Score + 5;

               'I write my own plugins for enjoyment' : Score := Score + 7;

               'I can work out my IP using a NotePad and pencil' : Score := Score + 10;

               'I Have sometimes laughed at a joke written in a Science Daily' : Score := Score + 5;
             else
              Begin
               WriteLn('Do It Properly :)');
               TerminateScript;
              end;
             end;
             Begin
               Case pplinspireyou.text Of

               'Albert Einstein' : Score := Score + 5;

               'Bill Gates' : Score := Score + 10;

               'Issac Newton' : Score := Score + 5;

              // 'Pythagoras' : Score := Score + 0;  Not really needed :)
             else
              Begin
               WriteLn('Do It Properly :)');
               TerminateScript;
              end;
             end;

            Begin
              Case piwhatusay.text Of

                '3.141 correct to 3 decimal places. Sir *smile like a nerd*' : Score := Score + 15;

                'I need to go to the bathroom' : Score := Score - 20;

                'I like pie' : Score := Score - 10;

                '*wake up* uhh the answer was 45' : Score := Score - 15;
            else
             Begin
              WriteLn('Do It Properly :)');
              TerminateScript;
             end;
            end;

           Begin
             If billgates.Checked Then
               Score := Score + 10
             else
               Score := Score - 5;
           end;
            Begin
              If oprah.Checked Then
               Score := Score + 5
             else
               Score := Score - 5;
           end;
            Begin
              If thecomp.Checked Then
                Score := Score + 15
              else
                Score := Score - 5;
            end;
             //yomamma Nothing needed as nothing changes :)
          Begin
            If INTELQ450.Checked Then
              Score := Score + 10
             else
              Score := Score - 10;
          end;

           Begin
             If LowerCase(Edit4.Text) = 'ram' Then
               Score := Score + 5
              else
               Score := Score - 5;
           end;
            Begin
             If fortranproglanguage.Checked Then
               Score := Score + 5
              else
               Score := Score - 5;
            end;
             Begin
              If Lispproglanguage.Checked Then
               Score := Score + 5
              else
               Score := Score - 5;
            end;
             Begin
              If seualclimaxscripting.Checked Then
               Score := Score + 5
              else
               Score := Score - 5;
             end;
          end;
       end;
     end;
    end;

    {-------------------------}
    {  H0r0Sc0pe Begins Here  }
    {-------------------------}

    var
      // HoroS variables.
      HoroSc0pe : String;
      I : Integer;
      frmDesign4 : TForm;
      GroupBox9 : TGroupBox;
      Label13, Label14 : TLabel;
      ComboBox4, ComboBox5, ComboBox6 : TComboBox;
      Memo7 : TMemo;
      horoscopebutton1 : TButton;

    // This form was parsed using: DFM Form Parser v.25 by Ron.
    procedure HoroS;
    var
      TimeHoroS : Integer;
    begin
      TimeHoroS := GetSystemTime;
      frmDesign4 := CreateForm;
      with frmDesign4 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 340;
        ClientHeight := 194;
        Caption := '                      Your HoroScope';
        Color := 8054685;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox9 := TGroupBox.Create(frmDesign4);
      with GroupBox9 do
      begin
        Parent := frmDesign4;
        Left := 0;
        Top := 0;
        Width := 337;
        Height := 193;
        Caption :=
          '                                          Horo Scope !!    ' +
          '                                    '
        TabOrder := 0;
      end;
      Label13 := TLabel.Create(GroupBox9);
      with Label13 do
      begin
        Parent := GroupBox9;
        Left := 64;
        Top := 16;
        Width := 196;
        Height := 13;
        Caption := 'Fill in your Date of Birth for the Horoscope';
      end;
      Label14 := TLabel.Create(GroupBox9);
      with Label14 do
      begin
        Parent := GroupBox9;
        Left := 96;
        Top := 104;
        Width := 109;
        Height := 13;
        Caption := 'Your Horoscope Says :';
      end;
      ComboBox4 := TComboBox.Create(GroupBox9);
      with ComboBox4 do
      begin
        Parent := GroupBox9;
        Left := 16;
        Top := 40;
        Width := 89;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 0;
        Text := 'Date Of Birth';
        with Items do
          begin
           For I := 1 to 31 do
            Add(IntToStr(i));
          end;
      end;
      ComboBox5 := TComboBox.Create(GroupBox9);
      with ComboBox5 do
      begin
        Parent := GroupBox9;
        Left := 208;
        Top := 40;
        Width := 97;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 1;
        Text := 'Month';
        with Items do
          begin
           Add('January');
           Add('Feburary');
           Add('March');
           Add('April');
           Add('May');
           Add('June');
           Add('July');
           Add('August');
           Add('September');
           Add('October');
           Add('November');
           Add('December');
          end;
      end;
      ComboBox6 := TComboBox.Create(GroupBox9);
      with ComboBox6 do
      begin
        Parent := GroupBox9;
        Left := 56;
        Top := 72;
        Width := 105;
        Height := 21;
        ItemHeight := 13;
        TabOrder := 2;
        Text := 'Year Of Birth';
        with Items do
          begin
            For I := 1 to 9 Do
            Add('190'+IntToStr(i)+'');  //Very Efficient
            For I := 9 to 99 Do         //Instead of long lines, I use [i]
            Add('19'+IntToStr(i)+'');   // :)
            For I := 0 to 8 Do
            Add('200'+IntToStr(i));
          end;
      end;
      Memo7 := TMemo.Create(GroupBox9);
      with Memo7 do
      begin
        Parent := GroupBox9;
        Left := 16;
        Top := 120;
        Width := 305;
        Height := 65;
        with Memo7.Lines do
        begin
          Add('Fill it in :)');
        end;
        TabOrder := 3;
      end;
      horoscopebutton1 := TButton.Create(GroupBox9);
      with horoscopebutton1 do
      begin
        Parent := GroupBox9;
        Left := 184;
        Top := 72;
        Width := 121;
        Height := 25;
        Caption := 'Click Me for Prediction';
        TabOrder := 4;
        OnClick := @Click;
      end;
      WriteLn('HoroS compiled in ' + IntToStr(GetSystemTime - TimeHoroS) + ' milliseconds!');
    end;

    procedure SafeHoroS;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('HoroS', V);
    end;

    procedure ShowHoroSModal;
    begin
      frmDesign4.ShowModal;
    end;

    procedure SafeShowHoroSModal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowHoroSModal', V);
    end;

    procedure MainHoroS;
    begin
      try
        SafeHoroS;
        SafeShowHoroSModal;
      except
        WriteLn('An error seems to have occurred in: HoroS');
      end;
    end;


    Procedure Predict;
    Var
        Capricorn, Aquarius,
        Pisces, Aries, Taurus : String;

        Gemini, Cancer, Leo,
        Virgo, Libra, Scorpio : String;

        Sagittarius : String;

    Begin
      Capricorn := 'Known, as the earth sign, Capricorn is represented by the Goat. Confidence and emotional support are the things the Capricorns need from their partners. Bright side: Careful, prudent, determined, reliable, hard working and persevering. Dark side: Ruthless, cold, over exacting, miserly, rigid and pessimistic';

      Aquarius := 'Represented by the Water Bearer, Aquarius is an airy sign. Aquarians love their privacy and freedom. Bright side: Humanitarian, friendly, independent, loyal, idealistic and creative. Dark side: Tactless, stubborn, eccentric, unpredictable, rebellious and perverse.';

      Pisces := 'Represented by the Fish, Pisces is a watery sign. Known, as the most poetic, romantic and idealist people, the Pisceans are caring and compassionate people. Bright side: Adaptable, sensitive, artistic, sympathetic and visionary. Dark side: Confused, manipulative, indecisive, impractical and greedy.';

      Aries := 'Being the first sign of the zodiac, Arians tend to put themselves first everywhere. Symbolized by a Ram, Aries is a fire sign. Arians are generous and affectionate towards their loved ones. Bright side: Direct, freedom loving, pioneering, forceful, adventurous and courageous. Dark side: Impatient, selfish, rash, impulsive, aggressive and quarrelsome.';

      Taurus := 'Marked by the Bull, Taurus is an earth sign. The fact they belong to the earth sign is proof enough to show the faithful trait of the Taureans like the earth. They are highly romantic and sensitive with a strong need of security. Bright side: Warm hearted, trustworthy, affectionate, practical, sensuous and patient. Dark side: Inflexible, lazy, stubborn, possessive, dull and resentful.';

      Gemini := 'Represented by the Twins in the zodiac chart, Geminis are known for their dual personalities. Known as an airy sign, Geminis are not the ones to be fooled easily. Bright side: Amusing, chatty, lively, adaptable, versatile, energetic and logical. Dark Side: Cunning, inconsistent, restless, changeable, two-faced and transparent.';

      Cancer := 'Cancer, represented by the Crab is a watery sign. Very emotional and afraid of being hurt are the peculiar traits of the cancerians. Bright side: Patriotic, cautious, protective, resourceful, good homemaker and kind. Dark side: Unstable, moody, hypersensitive, unforgiving and gullible.';

      Leo := 'Known as, the fire sign, Leo is represented by the Lion. Passionate, romantic and demonstrative are the words that can best describe the people belonging to the Leo sign. Bright side: Dramatic, broad minded, generous, enthusiastic, organized and creative. Dark side: Egotistical, stubborn, proud, conceited, jealous and pompous.';

      Virgo := 'Represented by the Virgin, Virgo is an earthy sign. Having a thoughtful approach, people belonging to this sign are shy and very self-conscious. Bright side: Modest, precise, meticulous, analytical and fastidious. Dark side: Self conscious, finicky, cynical, fussy and hypercritical.';

      Libra := 'Represented by the Scales, Libra is an airy sign. Librans are known to function with the help of someone special and take life as it comes. Bright side: Charming, romantic, idealistic, diplomatic, refined and easy going. Dark side: Frivolous, indecisive, easily influenced and changeable.';

      Scorpio := 'Marked by the Scorpion, Scorpio is a watery sign. Scorpions are famous for excelling in their love affairs and are very secretive in nature. Bright side: Subtle, committed, loyal, imaginative, persistent and determined. Dark side: Gullible, untidy, over emotional, changeable and unforgiving.';

      Sagittarius := 'Represented by the Archer sign, Sagittarius is fire sign. Getting in to a relationship with the Sagittarians is enjoyable and fun-filled. Bright side: Jovial, sincere, open-minded, frank, optimistic and philosophical. Dark side: Boastful, tactless, careless, lazy, moralizing and irresponsible.';

      Begin
      HoroSc0pe := '';
        Case (ComboBox5.Text) Of

           'January' : Begin
                        If StrToInt(ComboBox4.Text) < 19 Then
                          HoroSc0pe := Capricorn
                        else
                          HoroSc0pe := Aquarius;
                       end;

           'Feburary' : Begin
                         If StrToInt(ComboBox4.Text) < 18 Then
                           HoroSc0pe := Aquarius
                         else
                           HoroSc0pe := Pisces;
                        end;

           'March' : Begin
                        If StrToInt(ComboBox4.Text) < 20 Then
                          HoroSc0pe := Pisces
                        else
                          HoroSc0pe := Aries;
                     end;

           'April' :  Begin
                        If StrToInt(ComboBox4.Text) < 19 Then
                          HoroSc0pe := Aries
                        else
                          HoroSc0pe := Taurus;
                      end;

           'May' :  Begin
                      If StrToInt(ComboBox4.Text) < 20 Then
                        HoroSc0pe := Taurus
                       else
                        HoroSc0pe := Gemini;
                    end;

           'June' :  Begin
                       If StrToInt(ComboBox4.Text) < 21 Then
                         HoroSc0pe := Gemini
                       else
                         HoroSc0pe := Cancer;
                     end;

           'July' : Begin
                      If StrToInt(ComboBox4.Text) < 22 Then
                        HoroSc0pe := Cancer
                      else
                        HoroSc0pe := Leo;
                    end;

           'August' : Begin
                        If StrToInt(ComboBox4.Text) < 22 Then
                          HoroSc0pe := Leo
                        else
                          HoroSc0pe := Virgo;
                      end;


           'September' : Begin
                           If StrToInt(ComboBox4.Text) < 22 Then
                             HoroSc0pe := Virgo
                           else
                             HoroSc0pe := Libra;
                         end;

           'October' : Begin
                        If StrToInt(ComboBox4.Text) < 22 Then
                          HoroSc0pe := Libra
                        else
                          HoroSc0pe := Scorpio;
                       end;

           'November' : Begin
                         If StrToInt(ComboBox4.Text) < 21 Then
                           HoroSc0pe := Scorpio
                          else
                           HoroSc0pe := Sagittarius;
                        end;

           'December' : Begin
                         If StrToInt(ComboBox4.Text) < 21 Then
                           HoroSc0pe := Sagittarius
                          else
                           HoroSc0pe := Capricorn;
                        end;
                     end;
                 end;
         Memo7.Clear;
         Memo7.Lines.Add(HoroSc0pe);
           If HoroSc0pe = '' Then
            Memo7.Lines.Add('Error Please enter in Info')
           else
      Exit;
    end;

    Procedure Click(Sender : TObject);
    Var I, Ix : Integer;
    Begin
      Case Sender Of

      NextPage_1 : MainPage2;

      NextPage_2 : MainPage3;

      PreviousPage_2 : FrmDesign1.close;

      MarkTest_3 : Begin
                       FrmDesign.close;
                       FrmDesign1.close;
                       Ix := GetSystemTime;
                      // MarkTest;
                       Repeat
                         ProgressBar1.Step := 15 + Random(5);
                         I := I + 1;
                         Wait(50+Random(100));
                         ProgressBar1.StepIt;
                       Until(I = 6);

                       FrmDesign2.Close;
                       WriteLn('Marking Took ' +IntToStr(GetSystemTime - Ix)+' msec');
                   end;

      Previouspage_3 : FrmDesign2.close;

      horoscopebutton1 : Predict;

      Button_1 : Begin
                  Memo5.Clear;
                  Memo5.Lines.Add('Your Score Is : '+IntToStr(Score)+' :)');
              Begin
                Case Score Of
                  -100..0 : Memo6.Lines.Add('Wrong Test, try the "C00l T3st"');
                  0..70 : Memo6.Lines.Add('Typical nerd *sigh*');
                  70..100 : Memo6.Lines.Add('One of a Kind Nerd :) :)');
                  120..200 : Memo6.Lines.Add('Stop the press, Ive got a new front story');
                end;
             end;
            end;
       end;
    end;

    {-------------------------}
    { Calculat0r Begins Here  }
    {-------------------------}

    var
      // Calc variables.
      frmDesign5 : TForm;
      GroupBox1x, GroupBox2x, GroupBox3x, GroupBox4x : TGroupBox;
      Label1x, Label2x : TLabel;
      Button1x, Button2x, Button3x, Button4x,
      Button5x, Button6x, Button7x, Button8x,
      Button10x, Button11, Button9, Button12,
      Button13, Button14, Button15, Button16 : TButton;
      CheckBox1x : TCheckBox;
      edit1x : TEdit;

    procedure OnClickReadOnly(Sender6: TObject);   //Ty Ron :)
    begin
      Edit1x.ReadOnly := CheckBox1x.Checked;
      if (Edit1x.ReadOnly) then
        Edit1x.Font.Color := clGray
      else
        Edit1x.Font.Color := clBlack;
    end;

    // This form was parsed using: DFM Form Parser v.25 by Ron.
    procedure Calc;
    var
      TimeCalc : Integer;
    begin
      TimeCalc := GetSystemTime;
      frmDesign5 := CreateForm;
      with frmDesign5 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 252;
        ClientHeight := 234;
        Caption := 'Calculat0r Version 0.1 !!!';
        Color := 5031423;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      GroupBox1x := TGroupBox.Create(frmDesign5);
      with GroupBox1x do
      begin
        Parent := frmDesign5;
        Left := 0;
        Top := 0;
        Width := 249;
        Height := 233;
        Caption :=
          '                             Calculat0r!                        ' +
          '          '
        TabOrder := 0;
      end;
      GroupBox2x := TGroupBox.Create(GroupBox1x);
      with GroupBox2x do
      begin
        Parent := GroupBox1x;
        Left := 8;
        Top := 24;
        Width := 233;
        Height := 193;
        TabOrder := 0;
      end;
      GroupBox3x := TGroupBox.Create(GroupBox2x);
      with GroupBox3x do
      begin
        Parent := GroupBox2x;
        Left := 8;
        Top := 48;
        Width := 217;
        Height := 137;
        TabOrder := 0;
      end;
      Label1x := TLabel.Create(GroupBox3x);
      with Label1x do
      begin
        Parent := GroupBox3x;
        Left := 56;
        Top := 104;
        Width := 84;
        Height := 13;
        Caption := 'Calculator Ver 0.1';
      end;
      Label2x := TLabel.Create(GroupBox3x);
      with Label2x do
      begin
        Parent := GroupBox3x;
        Left := 56;
        Top := 120;
        Width := 90;
        Height := 13;
        Caption := 'By NaumanAkhlaQ';
      end;
      Button1x := TButton.Create(GroupBox3x);
      with Button1x do
      begin
        Parent := GroupBox3x;
        Left := 8;
        Top := 8;
        Width := 25;
        Height := 25;
        Caption := '1';
        TabOrder := 0;
        OnClick := @Assign;
      end;
      Button2x := TButton.Create(GroupBox3x);
      with Button2x do
      begin
        Parent := GroupBox3x;
        Left := 48;
        Top := 8;
        Width := 25;
        Height := 25;
        Caption := '2';
        TabOrder := 1;
        OnClick := @Assign;
      end;
      Button3x := TButton.Create(GroupBox3x);
      with Button3x do
      begin
        Parent := GroupBox3x;
        Left := 88;
        Top := 8;
        Width := 25;
        Height := 25;
        Caption := '3';
        TabOrder := 2;
        OnClick := @Assign;
      end;
      Button4x := TButton.Create(GroupBox3x);
      with Button4x do
      begin
        Parent := GroupBox3x;
        Left := 8;
        Top := 40;
        Width := 25;
        Height := 25;
        Caption := '4';
        TabOrder := 3;
        OnClick := @Assign;
      end;
      Button5x := TButton.Create(GroupBox3x);
      with Button5x do
      begin
        Parent := GroupBox3x;
        Left := 48;
        Top := 40;
        Width := 25;
        Height := 25;
        Caption := '5';
        TabOrder := 4;
        OnClick := @Assign;
      end;
      Button6x := TButton.Create(GroupBox3x);
      with Button6x do
      begin
        Parent := GroupBox3x;
        Left := 88;
        Top := 40;
        Width := 25;
        Height := 25;
        Caption := '6';
        TabOrder := 5;
        OnClick := @Assign;
      end;
      Button7x := TButton.Create(GroupBox3x);
      with Button7x do
      begin
        Parent := GroupBox3x;
        Left := 8;
        Top := 72;
        Width := 25;
        Height := 25;
        Caption := '7';
        TabOrder := 6;
        OnClick := @Assign;
      end;
      Button8x := TButton.Create(GroupBox3x);
      with Button8x do
      begin
        Parent := GroupBox3x;
        Left := 48;
        Top := 72;
        Width := 25;
        Height := 25;
        Caption := '8';
        TabOrder := 7;
        OnClick := @Assign;
      end;
      Button10x := TButton.Create(GroupBox3x);
      with Button10x do
      begin
        Parent := GroupBox3x;
        Left := 88;
        Top := 72;
        Width := 25;
        Height := 25;
        Caption := '9';
        TabOrder := 8;
        OnClick := @Assign;
      end;
      Button11 := TButton.Create(GroupBox3x);
      with Button11 do
      begin
        Parent := GroupBox3x;
        Left := 8;
        Top := 104;
        Width := 25;
        Height := 25;
        Caption := '0';
        TabOrder := 9;
        OnClick := @Assign;
      end;
      Button9 := TButton.Create(GroupBox3x);
      with Button9 do
      begin
        Parent := GroupBox3x;
        Left := 176;
        Top := 8;
        Width := 33;
        Height := 25;
        Caption := '+';
        TabOrder := 10;
        OnClick := @Assign;
      end;
      Button12 := TButton.Create(GroupBox3x);
      with Button12 do
      begin
        Parent := GroupBox3x;
        Left := 176;
        Top := 40;
        Width := 33;
        Height := 25;
        Caption := '-';
        TabOrder := 11;
        OnClick := @Assign;
      end;
      Button13 := TButton.Create(GroupBox3x);
      with Button13 do
      begin
        Parent := GroupBox3x;
        Left := 176;
        Top := 72;
        Width := 33;
        Height := 25;
        Caption := 'x';
        TabOrder := 12;
        OnClick := @Assign;
      end;
      Button14 := TButton.Create(GroupBox3x);
      with Button14 do
      begin
        Parent := GroupBox3x;
        Left := 176;
        Top := 104;
        Width := 33;
        Height := 25;
        Caption := '/';
        TabOrder := 13;
        OnClick := @Assign;
      end;
      Button15 := TButton.Create(GroupBox3x);
      with Button15 do
      begin
        Parent := GroupBox3x;
        Left := 128;
        Top := 8;
        Width := 33;
        Height := 57;
        Caption := 'Clear';
        TabOrder := 14;
        OnClick := @Assign;
      end;
      Button16 := TButton.Create(GroupBox3x);
      with Button16 do
      begin
        Parent := GroupBox3x;
        Left := 128;
        Top := 72;
        Width := 33;
        Height := 25;
        Caption := '=';
        TabOrder := 15;
        OnClick := @Assign;
      end;
      GroupBox4x := TGroupBox.Create(GroupBox2x);
      with GroupBox4x do
      begin
        Parent := GroupBox2x;
        Left := 8;
        Top := 8;
        Width := 217;
        Height := 33;
        TabOrder := 1;
      end;
      edit1x := TEdit.Create(GroupBox4x);
      with edit1x do
      begin
        Parent := GroupBox4x;
        Left := 0;
        Top := 8;
        Width := 217;
        Height := 21;
        TabOrder := 0;
        Text := 'Hello! I am Wall-E -- Please Enter your Sum !';
        ReadOnly := True;
      end;
      CheckBox1x := TCheckBox.Create(GroupBox1x);
      with CheckBox1x do
      begin
        Parent := GroupBox1x;
        Left := 64;
        Top := 216;
        Width := 97;
        Height := 17;
        Caption := 'Read Only?';
        TabOrder := 1;
        OnClick := @OnClickReadOnly;
      end;
      WriteLn('Calc compiled in ' + IntToStr(GetSystemTime - TimeCalc) + ' milliseconds!');
    end;

    procedure SafeCalc;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('Calc', V);
    end;

    procedure ShowCalcModal;
    begin
      frmDesign5.ShowModal;
    end;

    procedure SafeShowCalcModal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowCalcModal', V);
    end;

    procedure MainCalc;
    begin
      try
        SafeCalc;
        SafeShowCalcModal;
      except
        WriteLn('An error seems to have occurred in: Calc');
      end;
    end;


    Procedure Solve;
    Begin
      Case Calculation Of
        'Add' : edit1x.Text := IntToStr(Captcha1 + Captcha2);
        'Subtract' : edit1x.Text := IntToStr(Captcha1 - Captcha2);
        'Multiply' : edit1x.Text := IntToStr(Captcha1 * Captcha2);
        'Divide' : edit1x.Text := IntToStr(Captcha1 / Captcha2);
      end;
    end;

    Procedure Assign(Sender1 : TObject);
    Begin
      Case Sender1 Of
        Button1x : Value := 1;
        Button2x : Value := 2;
        Button3x : Value := 3;
        Button4x : Value := 4;
        Button5x : Value := 5;
        Button6x : Value := 6;
        Button7x : Value := 7;
        Button8x : Value := 8;
        Button9 : Begin
                    Captcha1 := StrToInt(edit1x.Text);
                    edit1x.Text := '';
                    Calculation := 'Add';
                    Exit;
                  end;

        Button12 : Begin
                    Captcha1 := StrToInt(edit1x.Text);
                    edit1x.Text := '';
                    Calculation := 'Subtract';
                    Exit;
                   end;

        Button13 : Begin
                    Captcha1 := StrToInt(edit1x.Text);
                    edit1x.Text := '';
                    Calculation := 'Multiply';
                    Exit;
                   end;

        Button14 : Begin
                    Captcha1 := StrToInt(edit1x.Text);
                    edit1x.Text := '';
                    Calculation := 'Divide';
                    Exit;
                  end;

        Button10x : Value := 9;
        Button11 : Value := 0;
        Button15 : Begin
                     edit1x.Text :='';
                     Exit;
                   end;

        Button16 : Begin
                     Captcha2 := StrToInt(edit1x.Text);
                     edit1x.Text := '';
                     Solve;
                     Exit;
                   end;
      end;
      if edit1x.Text = 'Hello! I am Wall-E -- Please Enter your Sum !' then
        edit1x.Text := '';
      edit1x.Text :=  edit1x.text + IntToStr(Value);  //Ty Ray for this line
    end;

    var
      // Main_Menu variables.
      frmDesign6 : TForm;
      n3rdt3stButton, H0r0sc0peButton, Calculatorbutton, Undecided : TButton;

    // This form was parsed using: DFM Form Parser v.25 by Ron.
    procedure Main_Menu;
    var
      TimeMain_Menu : Integer;
    begin
      TimeMain_Menu := GetSystemTime;
      frmDesign6 := CreateForm;
      with frmDesign6 do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        BorderIcons := [biMinimize,biSystemMenu];
        ClientWidth := 216;
        ClientHeight := 186;
        Caption := '4 Applications In 1';
        Color := 13544926;
        Font.Color := clWindowText;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Font.Style := [];
        PixelsPerInch := 96;
      end;
      n3rdt3stButton := TButton.Create(frmDesign6);
      with n3rdt3stButton do
      begin
        Parent := frmDesign6;
        Left := 8;
        Top := 8;
        Width := 89;
        Height := 73;
        Caption := 'The N3rd T3st !!!';
        TabOrder := 8;
        OnClick := @MainClick;
      end;
      H0r0sc0peButton := TButton.Create(frmDesign6);
      with H0r0sc0peButton do
      begin
        Parent := frmDesign6;
        Left := 112;
        Top := 8;
        Width := 89;
        Height := 73;
        Caption := 'Your HoroScope';
        TabOrder := 9;
        OnClick := @MainClick;
      end;
      Calculatorbutton := TButton.Create(frmDesign6);
      with Calculatorbutton do
      begin
        Parent := frmDesign6;
        Left := 8;
        Top := 96;
        Width := 89;
        Height := 73;
        Caption := 'Calculator V 0.1';
        TabOrder := 10;
        OnClick := @MainClick;
      end;
      Undecided := TButton.Create(frmDesign6);
      with Undecided do
      begin
        Parent := frmDesign6;
        Left := 112;
        Top := 96;
        Width := 89;
        Height := 73;
        Caption := 'Random App';
        TabOrder := 11;
        OnClick := @MainClick;
      end;
      WriteLn('Main_Menu compiled in ' + IntToStr(GetSystemTime - TimeMain_Menu) + ' milliseconds!');
    end;

    procedure SafeMain_Menu;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('Main_Menu', V);
    end;

    procedure ShowMain_MenuModal;
    begin
      frmDesign6.ShowModal;
    end;

    procedure SafeShowMain_MenuModal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowMain_MenuModal', V);
    end;

    procedure MainMain_Menu;
    begin
      try
        SafeMain_Menu;
        SafeShowMain_MenuModal;
      except
      end;
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    Procedure MainClick(Sender2 : TObject);
    Begin
      Case Sender2 Of

      n3rdt3stButton : Begin
                         MainPage1;
                         MarkTest;
                         MainResults;
                       end;

      H0r0sc0peButton : MainHoroS;

      Calculatorbutton : MainCalc;
     
      Undecided : Begin
                    Case Random(3) Of
                      0 : MainCalc;
                      1 : MainHoroS;
                      2 : Begin
                            MainPage1;
                            MarkTest;
                            MainResults;
                          end;
                     end;
                  end;
      end;
    end;

    Procedure FreeForms;
    Begin
      FreeForm(frmDesign);
      FreeForm(frmDesign);
      FreeForm(frmDesign2);
      FreeForm(frmDesign3);
      FreeForm(frmDesign4);
      FreeForm(frmDesign5);
      FreeForm(frmDesign6);
    end;

    Procedure MainLoop;
    begin
      ClearDebug;
      GetSelf.WindowState := wsMinimized;
      MainMain_Menu;
    GetSelf.WindowState := wsNormal;
      ClearDebug; //Comment if not needed :)
       If FastScript = True Then
         TerminateScript
       else
      FreeForms;
    end;

    Begin
      MainLoop;
    end.

    ?

  12. #12
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    i dunno if Naum's was supposed to be switchable, but i didnt find it to be so.

    This however, should be able to do so
    SCAR Code:
    var
      frmdesign, Properties: TForm;

    procedure InitForm;
    var i: integer;
    begin
      frmdesign := CreateForm;
      with frmdesign do
      begin
        Position := poScreenCenter;
        Width := 768;
        Height := 300;
        Caption := 'Floob';
        borderStyle := bsDialog;
        autoscroll := false;
        FormStyle := fsStayOnTop;
      end;
      Properties := CreateForm;
      with Properties do
      begin
        left := frmdesign.left;
        top := frmdesign.Top + frmdesign.Height;
        Width := 200;
        Height := 500;
        Caption := 'Meow';
        autoscroll := false;
        FormStyle := fsStayonTop;
      end;
    end;

    procedure SafeInitForm;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('InitForm', V);
    end;

    procedure ShowInitFormModal;
    begin
      frmdesign.Show;
      Properties.Show;
    end;

    procedure SafeShowInitFormModal;
    var
      V : TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowInitFormModal', V);
    end;

    begin
      //ClearDebug;
      //GetSelf.WindowState := wsMinimized;
      try
        SafeInitForm;
        SafeShowInitFormModal;
        while true do getapplication.processmessages();
      finally
        FreeForm(frmdesign);
      except
        WriteLn('Hey Yo! You''ve got an error in your InitForm :D');
      end;
      //GetSelf.WindowState := wsMaximized;
    end.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  13. #13
    Join Date
    Jul 2009
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I already have it figured out lol
    Quote Originally Posted by Cstrike View Post
    Why do I even try these things? I just shit my pants over this god damn tutorial. Fuck, that's uncleanable. I can't even wash that out because there's so much of my shit it will just stain everything else. If I put it in the washing machine, I'm sure to stain the sides.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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