这个该怎么样实现```` 用一个按钮控制窗口的大小`````比如 点一下按钮 窗口变成 600*800的 再按一下成1024*768的 再按一下变回原始大小```````我只能按一下变了后就变不回来了````请问该怎么样实现```程序段该怎么样写````谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1; sH,sW:integer;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin if button1.caption='800*600' then begin form1.Width:=800;form1.Height:=600; button1.caption:='1024*768'; exit; end; if button1.caption='1024*768' then begin form1.Width:=1024;form1.Height:=768; button1.caption:='原來';exit; end; if button1.caption='原來' then begin form1.Width:=sw;form1.Height:=sh; button1.caption:='800*600';exit; end;end;procedure TForm1.FormCreate(Sender: TObject);begin sw:=form1.Width;sh:=form1.Height;end;end.開始設置 button1.caption:='800*600' 请教高人,如何用程序更改本机的外网ip 英文版sql server2000 查询中文 的问题 请问如何在Delphi中播放多媒体文件,比如Wma,asf~ 在安装Ehlib控件时,为何总是提示dbsumlst.dcu文件找不到?(初学者,很急!) dbgrid简单问题,关于DrawColumnCell的 3层结构中 应用服务器的窗体部分如何能用到远程数据模块中的过程和方法? 关于菜单权限!请有经验的帮忙! 分享:Delphi导入EXCEL数据表的交互技术(全用代码实现) 请教各位大虾一个问题 关于变量传递问题,请高手帮忙! 用过条码枪的进来说说 串口通信问题!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
sH,sW:integer;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
if button1.caption='800*600' then
begin
form1.Width:=800;form1.Height:=600;
button1.caption:='1024*768'; exit;
end;
if button1.caption='1024*768' then
begin
form1.Width:=1024;form1.Height:=768;
button1.caption:='原來';exit;
end;
if button1.caption='原來' then
begin
form1.Width:=sw;form1.Height:=sh;
button1.caption:='800*600';exit;
end;
end;procedure TForm1.FormCreate(Sender: TObject);
begin
sw:=form1.Width;sh:=form1.Height;
end;end.
開始設置 button1.caption:='800*600'