Delphi学习之函数 ⑿其它函数及过程

//▎============================================================▎//
//▎=====================⑿其它函数及过程=======================▎//
//▎============================================================▎//

function TrimInt(Value, Min, Max: Integer): Integer; overload;    {测试通过}
{* 输出限制在Min..Max之间}

function IntToByte(Value: Integer): Byte; overload;   {测试通过}
{* 输出限制在0..255之间}

function InBound(Value: Integer; Min, Max: Integer): Boolean;    {测试通过}
{* 判断整数Value是否在Min和Max之间}

procedure CnSwap(var A, B: Byte); overload;
{* 交换两个数}
procedure CnSwap(var A, B: Integer); overload;
{* 交换两个数}
procedure CnSwap(var A, B: Single); overload;
{* 交换两个数}
procedure CnSwap(var A, B: Double); overload;
{* 交换两个数}

function RectEqu(Rect1, Rect2: TRect): Boolean;
{* 比较两个Rect是否相等}

procedure DeRect(Rect: TRect; var x, y, Width, Height: Integer);
{* 分解一个TRect为左上角坐标x, y和宽度Width、高度Height}

function EnSize(cx, cy: Integer): TSize;
{* 返回一个TSize类型}

function RectWidth(Rect: TRect): Integer;
{* 计算TRect的宽度}

function RectHeight(Rect: TRect): Integer;
{* 计算TRect的高度}

procedure Delay(const uDelay: DWORD);     {测试通过}
{* 延时}

procedure BeepEx(const Freq: WORD = 1200; const Delay: WORD = 1);     {Win9X下测试通过}
{* 只能在Win9X下让喇叭发声}

procedure ShowLastError;       {测试通过}
{* 显示Win32 Api运行结果信息}

function writeFontStyle(FS: TFontStyles; inifile: string; write: boolean):string;
{* 将字体Font.Style写入INI文件}

function readFontStyle(inifile: string): TFontStyles;
{* 从INI文件中读取字体Font.Style文件}

//function ReadCursorPos(SourceMemo: TMemo): TPoint;
function ReadCursorPos(SourceMemo: TMemo): string;
{* 取得TMemo 控件当前光标的行和列信息到Tpoint中}

function CanUndo(AMemo: TMemo): Boolean;
{* 检查Tmemo控件能否Undo}

procedure Undo(Amemo: Tmemo);
{*实现Undo功能}

procedure AutoListDisplay(ACombox:TComboBox);
{* 实现ComBoBox自动下拉}

function UpperMoney(small:real):string;
{* 小写金额转换为大写 }

function Myrandom(Num: Integer): integer;
{*利用系统时间产生随机数)}

procedure OpenIME(ImeName: string);
{*打开输入法}

procedure CloseIME;
{*关闭输入法}

procedure ToChinese(hWindows: THandle; bChinese: boolean);
{*打开中文输入法}

//数据备份
procedure BackUpData(LpBackDispMessTitle:String);


implementation  {▎=======函数及过程体开始==========▎}

 

转载于:https://www.cnblogs.com/flay/archive/2012/04/20/2460123.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值