Results 1 to 10 of 10

Thread: Forms?

  1. #1
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Forms?

    EDIT: added whole script check it out if you dont get me


    well i need help with forms. i can design it and get it to pop up ect... but how do i use it. So far i get it to come up with 3 edit boxes to type your message in and a start button when clicked the form closes.

    SCAR Code:
    Var
     
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      Message : TEdit;
      Message2 : TEdit;
      Message3 : TEdit;
      StartButton : TButton;
     

    procedure StartClick(sender: TObject);
    begin
      Writeln('Starting Form.');
      frmDesign.ModalResult:= mrOk; // Closes the form
    end;


    Procedure InitForm;
    Begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'frmDesign';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := '@Batang';
    frmDesign.Font.Style := [];
    frmDesign.Visible := False;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 304;
    Label1.Top := 72;
    Label1.Width := 127;
    Label1.Height := 26;
    Label1.Caption := 'Message One To Type.';
    Label1.Color := clSkyBlue;
    Label1.Font.Color := clWindowText;
    Label1.Font.Height := -19;
    Label1.Font.Name := 'Cordia New';
    Label1.Font.Style := [];
    Label1.ParentColor := False;
    Label1.ParentFont := False;
    Label2 := TLabel.Create(frmDesign);
    Label2.Parent := frmDesign;
    Label2.Left := 304;
    Label2.Top := 120;
    Label2.Width := 105;
    Label2.Height := 11;
    Label2.Caption := 'Message 2 To Type.';
    Label3 := TLabel.Create(frmDesign);
    Label3.Parent := frmDesign;
    Label3.Left := 304;
    Label3.Top := 160;
    Label3.Width := 103;
    Label3.Height := 11;
    Label3.Caption := 'Message 3 To Type';
    Message := TEdit.Create(frmDesign);
    Message.Parent := frmDesign;
    Message.Left := 16;
    Message.Top := 72;
    Message.Width := 225;
    Message.Height := 19;
    Message.TabOrder := 8;
    Message.Text := 'Type A Message Here';
    Message2 := TEdit.Create(frmDesign);
    Message2.Parent := frmDesign;
    Message2.Left := 16;
    Message2.Top := 120;
    Message2.Width := 223;
    Message2.Height := 17;
    Message2.Ctl3D := False;
    Message2.DragCursor := crArrow;
    Message2.ParentCtl3D := False;
    Message2.TabOrder := 9;
    Message2.Text := 'Type Another Messsage Here';
    Message3 := TEdit.Create(frmDesign);
    Message3.Parent := frmDesign;
    Message3.Left := 14;
    Message3.Top := 168;
    Message3.Width := 225;
    Message3.Height := 19;
    Message3.TabOrder := 10;
    Message3.Text := 'And Another Message';
    StartButton := TButton.Create(frmDesign);
    StartButton.Parent := frmDesign;
    StartButton.Left := 488;
    StartButton.Top := 360;
    StartButton.Width := 129;
    StartButton.Height := 57;
    StartButton.Caption := 'Start';
    StartButton.OnClick := @StartClick;
    StartButton.TabOrder := 11;
    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;

    in the mainloop i have

    SCAR Code:
    SafeInitForm;
      SafeShowFormModal;


    Now i want to type them messages so im stuck on this procedure. i will sort all the multimessages out after i get this to work

    SCAR Code:
    procedure WriteIt;
    var
    HowManyTypez: Integer;
    begin
      FindFastRandoms;
      AntiBan;
      repeat
        TypeSend('YOooooooooooooooo');
        Talked := Talked + 1;
        HowManyTypez := HowManyTypez + 1
      until (HowManyTypez = HowManyTypes);
    end;

  2. #2
    Join Date
    Nov 2006
    Location
    Bel Air, Maryland, USA
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  3. #3
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have and im still confused

  4. #4
    Join Date
    Nov 2006
    Location
    Bel Air, Maryland, USA
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok so i dont get what your asking for, are you asking how to use handle form variables?, if so i think what your looking to do is, example for your first message box, if you want to get the string back from inside the form after form is complete/closed, what ur form does is store the first message in a variable called Message.Text

    so in order to get it to read that thing youd need to use message.text or message2.text or message3.text as a string, ex: writeln(message2.text);

    i hope this helped you

  5. #5
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thats sort of what i need but i change it to TypeSend(Message.text) and it still dont work


    EDIT: Got it to work thanks maN!

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I tried it with : Writeln(Message.Text); works for me.
    Administrator's Warning:


  7. #7
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeh i just had to target a screen for typesend to work

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    maybe you use summilions form its very good i think its better then a normal form (sorry )
    ~Hermen

  9. #9
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by hermpie View Post
    maybe you use summilions form its very good i think its better then a normal form (sorry )
    What do you mean ?
    Administrator's Warning:


  10. #10
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Woot im sorta finding them a breeze.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Forms
    By marre in forum OSR Help
    Replies: 2
    Last Post: 12-19-2007, 07:53 PM
  2. Need help with forms!
    By Da Der Der in forum OSR Help
    Replies: 2
    Last Post: 01-14-2007, 07:13 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
  •