1、编写一个简单程序。要求:在窗体上创建一个文本框控件、两个命令按钮控件,命令

1、编写一个简单程序。要求:在窗体上创建一个文本框控件、两个命令按钮控件,命令按钮的标题分别设置“显示”和“退出”,单击“显示”按钮在文本框显示“欢迎使用Visual Basic”,单击“退出”后退出运行(代码是:End)。并保存它们到自己的文件夹。
2、编写一个简单程序。要求:在窗体上创建一个文本框控件、两个命令按钮控件,命令按钮的标题

第1个回答  2009-09-18
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
edit1.Text:='欢迎使用visul basic';
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;

end.
这个是Delphi的
第2个回答  2009-09-17
用DELPHI可以吗?