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

📄 xtools.txt

📁 我自己用的Delphi函数单元 具体说明见打包文件的HELP目录下面
💻 TXT
字号:
unit xTools;


//设置本地应用环境
procedure SetLocal;

//延时函数
procedure Delay(const uDelay:DWORD);

//进行必须让用户暂时等待,无法操作的长时间动作前,先调用DoBusy函数,输入
//True,可使鼠标换成忙碌指针,待动作完成后,输入False还原。
procedure DoBusy(Busy: Boolean);

//使PC喇叭发声的函数,支持Win9x,NT
function BeepEx(const Freq:DWORD;const Delay:DWORD):BOOL;

function MsgBox(const Msg: string;Flag:Integer = MB_ICONINFORMATION or MB_OK):Integer;
function ErrorBox(const Msg: string;Flag:Integer = MB_ICONERROR or MB_OK):Integer;
function WarningBox(const Msg: string;Flag:Integer = MB_ICONEXCLAMATION or MB_OK):Integer;
function YesNoBox(const Msg: string):Integer;
function YesNoCancelBox(const Msg: string): Integer;

//取得最近一次调用API函数发生错误后的错误描述。
function GetLastErrorString: string;

//调用API函数,若返回值发生错误,可使用本函数显示错误。
procedure ShowLastError(const Msg: string = 'Windows API 错误');

//调用API函数,若返回值发生错误,产生异常。
procedure RaiseLastError(const Msg: string = 'Windows API 错误');

//根据表达式布尔值,返回TrueValue,或FalseValue,类似VFP中的IIF。
function varIIF( aTest: Boolean; TrueValue, FalseValue : Variant): Variant;

//将各种类型的变量值转换为字符串
function varToStr(const V: Variant): String;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -