zoukankan      html  css  js  c++  java
  • CnCommon 的一些通用函数说明

    uses CnCommon;

    // 目录尾加'\'修正
    function MakePath(const Dir: string): string;
    // 路径尾去掉 '\'
    function MakeDir(const Path: string): string;

    // 取系统目录
    function GetSystemDir: string;

    // 取Program Files目录
    function GetProgramFilesDir: string;

    // 取Windows目录
    function GetWindowsDir: string;

     // 应用程序路径
    function AppPath: string;

    // 创建GUID字符串
    function CreateGuidString: string;

    // 打开一个链接
    procedure OpenUrl(const Url: string; UseCmd: Boolean);

    // 发送邮件
    procedure MailTo(const Addr: string; const Subject: string; UseCmd: Boolean);

    // 在字符串中某字符出现的次数
    function CharCounts(Str: PChar; Chr: Char): Integer;

    function GetHzPy(const AHzStr: AnsiString): AnsiString;
    {* 取汉字的拼音}

    function DynamicResolution(x, y: WORD): Boolean;
    {* 动态设置分辨率}

    procedure StayOnTop(Handle: HWND; OnTop: Boolean);
    {* 窗口最上方显示}

    procedure SetHidden(Hide: Boolean);
    {* 设置程序是否出现在任务栏}

    procedure SetTaskBarVisible(Visible: Boolean);
    {* 设置任务栏是否可见}

    procedure SetDesktopVisible(Visible: Boolean);
    {* 设置桌面是否可见}

    function GetYear(Date: TDate): Integer;
    {* 取日期年份分量}
    function GetMonth(Date: TDate): Integer;
    {* 取日期月份分量}
    function GetDay(Date: TDate): Integer;
    {* 取日期天数分量}
    function GetHour(Time: TTime): Integer;
    {* 取时间小时分量}
    function GetMinute(Time: TTime): Integer;
    {* 取时间分钟分量}
    function GetSecond(Time: TTime): Integer;
    {* 取时间秒分量}
    function GetMSecond(Time: TTime): Integer;
    {* 取时间毫秒分量}

    function OpenDialog(var FileName: string; Title: string; Filter: string;
      Ext: string): Boolean;
    {* 打开文件框}

  • 相关阅读:
    Delphi关于记录文件的操作转
    数字电视分辨率
    delphi FileSetAttr 设置文件的属性转
    vc delphi 回调函数具体说明和实例与分析 转
    TFileStream(文件流) 读写转
    HDMI接口
    UDP和TCP协议包大小的计算转
    字符编解码的故事(ASCII,ANSI,Unicode,Utf8) 转
    [bzoj3894]文理分科
    [bzoj5338]xor
  • 原文地址:https://www.cnblogs.com/jieke/p/2838656.html
Copyright © 2011-2022 走看看