uses Dialogs;procedure TForm1.Button1Click(Sender: TObject);
var
  InputString: string;
begin
  InputString:= InputBox('Input Box', 'Prompt', 'Default string');end;

解决方案 »

  1.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      InputString: string;
    begin
      InputString := Caption;
      if not InputQuery('Input Box', 'Prompt', InputString) then Exit;
      Caption := InputString;
    end;
      

  2.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    form1.Height:=edit1.Height;
    form1.Width:=edit1.Width;
    edit1.Top:=0;
    edit1.Left:=0;
    form1.BorderStyle:=bsnone;
    end;end.这种方法一定行,试试吧。
      

  3.   

    使用inputbox函数吧!
    函数声明:function InputBox(const ACaption, APrompt, ADefault: string): string;
    描述:Description
    Call InputBox to bring up an input dialog box ready for the user to enter a string in its edit box. ACaption is the caption of the dialog box.APrompt is the text that prompts the user to enter input in the edit box.ADefault is the string that appears in the edit box when the dialog box first appears.If the user chooses the Cancel button, InputBox returns the default string. If the user chooses the OK button, InputBox returns the string in the edit box.Use the InputBox function when there is a default value that should be used when the user chooses the Cancel button (or presses Esc) to exit the dialog. If the application needs to know whether the user chooses OK or Cancel, use the InputQuery function instead.例程:
    uses Dialogs;procedure TForm1.Button1Click(Sender: TObject);
    var
      InputString: string;
    begin
      InputString:= InputBox('Input Box', 'Prompt', 'Default string');end;
      

  4.   

    可以自己做一个!!!
    也可用Delphi给的InputBox,很简单的,如果不明白的话,你可以看一下它的Help中的Sample