⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unhelp.pas

📁 最简单的Delphi班级管理系统
💻 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 + -