Delphi的编程问题设计一个流
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,Menus,ExtCtrls,StdCtrls;typeTForm1=class(TForm)Label1:TLabel;Button1:TButton;PopupMenu1:TPopupMenu;Timer1:TTimer;N1:TMenuItem;N2:TMenuItem;N3:TMenuItem;procedureButton1Click( );procedureTimer1Timer( )...全部
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,Menus,ExtCtrls,StdCtrls;typeTForm1=class(TForm)Label1:TLabel;Button1:TButton;PopupMenu1:TPopupMenu;Timer1:TTimer;N1:TMenuItem;N2:TMenuItem;N3:TMenuItem;procedureButton1Click( );procedureTimer1Timer( );procedureN1Click( );procedureN2Click( );procedureN3Click( );private{Privatedeclarations}public{Publicdeclarations}end;varForm1:TForm1;implementation{$R*。
dfm}procedureTForm1。Button1Click( );beginifbutton1。Caption='暂停'thenbeginbutton1。Caption:='继续';timer1。
Enabled:=false;endelsebeginbutton1。Caption:='暂停';timer1。Enabled:=true;endend;procedureTForm1。Timer1Timer( );beginiflabel1。
Left N1Click( );beginform1。Color:=clred;end;procedureTForm1。N2Click( );beginform1。Color:=clgreen;end;procedureTForm1。
N3Click( );beginform1。Color:=clwhite;end;end。收起