?? unhelp.pas
字號:
unit UnHelp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, StdCtrls, ExtCtrls, Buttons;
type
TForm2 = class(TForm)
SpeedButton1: TSpeedButton;
Timer1: TTimer;
lb1: TLabel;
Timer2: TTimer;
lb2: TLabel;
Image2: TImage;
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
function init:boolean;
{ Public declarations }
end;
var
Form2: TForm2;
Flag1:Integer;//用于滾動顯示歌曲名時的判斷變量
implementation
{$R *.dfm}
function TForm2.init; //初始化
begin
init:=false;
if Application.FindComponent('Form2')=nil then
Application.CreateForm(TForm2,Form2);
init:=true;
end;
procedure TForm2.Timer1Timer(Sender: TObject);
begin
if lb1.Enabled=true then
begin
lb1.Left:=lb1.Left-1;
if (lb1.Left+lb1.Width)=0 then
begin
lb1.Left:=Form2.Width;
lb1.Enabled:=false;
end;
end;
if (lb1.Left=0)and(flag1=0) then
begin
flag1:=1;
lb2.Visible:=true;
lb2.Left:=Form2.Width;
end;
if flag1=1 then
begin
lb2.Left:=lb2.Left-1;
if lb2.Left=0 then
begin
lb1.Enabled:=true;
timer2.Enabled:=true;
timer1.Enabled:=false;
end;
end;
end;
procedure TForm2.Timer2Timer(Sender: TObject);
begin
if lb2.Enabled=true then
begin
if lb2.Left=0 then
begin
lb1.Enabled:=true;
end;
lb2.Left:=lb2.Left-1;
if (lb2.Left+lb2.Width)=0 then
begin
lb2.Left:=Form2.Width;
lb2.Enabled:=false;
end;
end;
if lb1.Enabled=true then
begin
if lb1.Left=0 then
begin
lb2.Enabled:=true;
end;
lb1.Left:=lb1.Left-1;
if (lb1.Left+lb1.Width)=0 then
begin
lb1.Left:=Form2.Width;
lb1.Enabled:=false;
end;
end;
end;
procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
Form2.Close;
release; //釋放資源
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -