Program IFSTest; var F, Form: TForm; i: Longint; Labl: TLabel; Button: TButton; Edit: TEdit; Memo: TMemo; Stop: Boolean; Begin Form := TForm.Create(self); Form.Width := 400; Form.Height := 300; Form.BorderStyle := bsDialog; Form.BorderIcons := []; Form.Caption := 'Name'; Form.Position := poScreenCenter; Labl := TLabel.Create(Form); Labl.Top := 120; Labl.Left := 160; Labl.Caption := 'Please type in your name:'; Labl.Parent := Form; Edit := TEdit.Create(Form); Edit.Font.Name := 'Tahoma'; Edit.SetBounds(160,160,80,24); Edit.Parent := Form; Button := TButton.Create(Form); Button.Left := 160; Button.Top := 200; Button.Width := 80; Button.Height := 24; Button.Caption := '&OK'; Button.Parent := Form; Button.Default := True; Memo := TMemo.Create(Form); Memo.Left := 10; Memo.Width := 380; Memo.Top := 10; Memo.Height := 100; Memo.Text := 'Welcome to Form Test.'#13#10#13#10'Plase wait till the loop is over.'; Memo.Color := 0; Memo.Font.Color := $FFFFFF; Memo.Parent := Form; Memo.Readonly := True; Form.Visible := true; Form.Refresh; stop := false; while Form.Visible do begin Application.ProcessMessages; i := i + 1; if i > 100000 then Break; end; Button.Free; Form.Free; End.