运行结果截图:{ 作用:在窗体的Image组件随机画不同颜色的线 环境:delphi7+winxp3 通过测试 完成时间:12:10 2011-3-9 } //************************ unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Image1: TImage; Label1: TLabel; Label2: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormActivate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; act:Boolean; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject);//暂停 begin act:=False; Label2.visible:=True; //暂停报告 Label1.Visible:=False; end; procedure TForm1.Button2Click(Sender: TObj