📄 waitmsg.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "WaitMsg.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TWaitMsg *WaitMsg;
//---------------------------------------------------------------------------
__fastcall TWaitMsg::TWaitMsg(TComponent* Owner)
: TForm(Owner)
{
Screen->Cursor=crHourGlass;
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::FormCreate(TObject *Sender)
{
amWait->Active=true;
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::FormDeactivate(TObject *Sender)
{
this->BringToFront();
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::FormDestroy(TObject *Sender)
{
Screen->Cursor=crDefault;
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::set_Title(AnsiString value)
{
Label1->Caption=value;
Label2->Caption=value;
this->Paint();
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::set_AniFile(AnsiString value)
{
if(value.IsEmpty())
amWait->CommonAVI=aviFindFolder;
else
{
if(FileExists(value))
{
amWait->Active=false;
amWait->CommonAVI=aviNone;
amWait->FileName=value;
amWait->Active=true;
}
else
throw Exception("动画文件"+value+"不存在!");
}
}
//---------------------------------------------------------------------------
void __fastcall TWaitMsg::set_WaitMessage(AnsiString value)
{
lbWaitStr->Caption=value;
Application->ProcessMessages();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -