Unit22.pas
资源名称:HIS.rar [点击查看]
上传用户:fjdqny
上传日期:2016-10-26
资源大小:6299k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit Unit22;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, jpeg, ExtCtrls, StdCtrls;
- type
- TForm22 = class(TForm)
- Image1: TImage;
- Memo1: TMemo;
- Button1: TButton;
- Label1: TLabel;
- Timer1: TTimer;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form22: TForm22;
- flag:integer;
- implementation
- {$R *.dfm}
- procedure TForm22.Button1Click(Sender: TObject);
- begin
- form22.Close;
- end;
- procedure TForm22.FormCreate(Sender: TObject);
- begin
- flag:=1;
- end;
- procedure TForm22.Timer1Timer(Sender: TObject);
- begin
- if (flag=1) and (form22.Label1.Left <=0) then
- flag:=2;
- if (flag=2) and (form22.Label1.left+form22.Label1.Width >=form22.Width ) then
- flag:=1;
- case flag of
- 1: form22.Label1.Left :=form22.Label1.Left-10;
- 2: form22.Label1.Left :=form22.Label1.Left+10;
- end;
- end;
- end.