First of all, thank you very much for your use.
At the same time, I hope you can expand this feature package... and release your expanded version.
-------------------------------------------------- -------
^^
It is stated that this component package can only be installed normally on delphi7.
If you are using delphi6. an error will occur during installation.
--------------------------------------------------
Author: Li Jinhao
QQ:67260745
E-mail:[email protected]
Most of the function modules in the function package are written by myself. . Part of it includes the works of my netizens and some of the more classic program segments on the Internet.
Function HexBCDToint(sHexBCD:Byte):integer;
Function IntToBCD(Int:Byte):word;
Function MinuteToTime(Minute:Double):TdateTime;overload;//Conversion of minutes to standard time Function MinuteToTime(Minute:Double;var DayCount:integer):TdateTime;overload;
//------------------------------------------------ ----------------------------------
Function GetWeekOfChina(dDay:TdateTime):string;//Get the day of the week Function GetWeekOfNum(dDay:TdateTime):integer;
//------------------------------------------------ ----------------------------------
Function IsStrAsNumber(NumStr:string):Bool;//Determine whether the string is a valid number in the string Function IsStrInOtherStr(mainStr,FindStr:string):Bool;//Detect whether another string is included in a string function IsCOMClassRegistered (GUID:TGUID):Boolean;//Determine whether a COM object has been registered Function IsBDEInstalled:boolean;//Check whether the BDE has installed function GetPYIndexChar(hzchar:string):char;//Get the first letter of the Chinese character Function Squ(X ,Y:integer):integer;overload;//Calculate the Y power of x Function Squ(X:Double;Y:integer):Double;overload;//Calculate the Y power of x Function RandomNumByGUID:String;
//--------------System functions------------
Function AppRunOnce:Boolean;//Let the program run only one instance procedure AutoRunByReg(FileName:string= );//Let the program automatically run procedure DelAutoRunByReg(KeyName:string= );//Delete a self-starting item procedure MoveWindow(handle: Thandle);overload;//Drive the untitled form Function GetAppPath(AddLastName:string= ):string;//Get the current directory of the program Procedure ReMoveWinTitle(Form:Tform);//Remove the form's Title;
procedure BeepEx(Freq:Word;MSecs:LongInt); //DoBeep calls procedure ClickStartMenu;//Activate the start menu procedure through code OpenScreenSave;//Turn on the screen saver//procedure DelTree(DirName:String);//Delete directory procedure DeleteDir(SourcePath: String); //Delete the specified folder (including subfolders). The folder and the files within it can have read-only or hidden attributes procedure DelSelfApp; //The program will delete itself after running (*- ----------------*)
procedure HideTaskBar(bHide:boolean=False);//Show or hide TaskBar
procedure DisplayOFFON(SW: boolean);//Turn off and turn on the display procedure HideDesktop(sw:Boolean=false);//Show and hide the desktop procedure HideDesktopAndTaskBar(sw:Boolean=false);//Hide the desktop and taskbar at the same time procedure HideTrayNotify (sw:Boolean=false);//Hide the system notification area procedure HideWinButton(sw:Boolean=false);//Hide the start button procedure HideQuickLaunchBar(sw:Boolean=false);//Hide the quick launch button bar//procedure HideAppInTastWin (sw:Boolean=False);//Hide the program in the task manager procedure DisbleQuikKey(sw:boolean=false);//Shield ALT+F4 and ALT+Ctrl+Del
Function GetTaskBarHeight:integer;//Get the height of the taskbar
//------------------------------------------------ ----------------------------------
function GetDesktopListViewHandle: THandle; {Get the handle of the desktop list view}
procedure MinWinAll;//Minimize all forms procedure CloseWinAll;//Close all forms procedure DrawWindowRect(handle: Thandle;wColor: Tcolor=clBlack;PenWidth:integer=1);//Add a border to the form Procedure SetParentWinDefFont (Sender:TObject;const defFont:Tfont=nil);//Set the default font of the parent form {get the position of the cursor in memo, line number, line length}
procedure GetMemoMousePos(m:Tmemo;var posValue:TmemoPos);overload;
procedure GetMemoMousePos(m:TRichEdit;var posValue:TmemoPos);overload;
//Memo page turning procedure setScrollPos(MHandle:Thandle;const pos:TClickType=PageDown);overload;
//Get the size of the specified form procedure GetWinRect(const WinHandle:HWND;var winRect:TwinRect);
procedure TimeDelay(DT:Dword);//Accurate millisecond delay procedure SetIPaddress(SIP: TNetValue;const isAuto:boolean=false);//Set the network IP address Function GetLocalIP:string;//Get the IP address of the machine Procedure OpenURL(URL:string);//Open a web URL
//================================================ ==============================
// The functions in this part are taken from other authors. Unknown names
//================================================ ==============================
function GetDisplayFrequency: Integer; //Get the display refresh rate function GetIdeSerialNumber: String; //Get the serial number of the first hard disk function GetCPUSpeed: Double; //Get the current CPU speed Function GetCPUID:string; //Get the CPU ID
Function GetCPUVendor: string; //Get the CPU type Function GetFileLastAccessTime(sFileName:string):TDateTime; //Get the last access date and time of the file Function GetFileCreateTime(const strFileName:string):TDateTime; //Get the file creation time Function GetFileModifyTime(const strFileName:string):TDateTime; //Get file modification time Function GetDNSTOIP(DNSName:String):String; //Convert domain name to IP address Function GetDNSName(IPAddress:String):String; //Convert IP address to domain name
//================================================ ==============================
// End of excerpt part
//================================================ ==============================
//--------------------------------
// procedure GetNetConf
//----------INI file operation set-----------
(*_read ini file_*)
Function ReadIniFile(const FileName,Section, Ident:string; Default: string):string; overload;
Function ReadIniFile(const FileName,Section, Ident:string; Default: integer):integer; overload;
Function ReadIniFile(const FileName,Section, Ident:string; Default: Double):Double; overload;
Function ReadIniFile(const FileName,Section, Ident:string; Default: Boolean):Boolean; overload;
Function ReadIniFile(const FileName,Section, Ident:string; Default: TdateTime):TdateTime; overload;
(*_Write INI file_*)
procedure WriteIniFile(const FileName,Section, Ident:string; Value:string);overload;
procedure WriteIniFile(const FileName,Section, Ident:string; Value:integer);overload;
procedure WriteIniFile(const FileName,Section, Ident:string; Value:Double);overload;
procedure WriteIniFile(const FileName,Section, Ident:string; Value:Boolean);overload;
procedure WriteIniFile(const FileName,Section, Ident:string; Value:TdateTime);overload;
//--------------------------
(*Simulate mouse click*)
procedure SendMouseClick(const WinHandle:HWND;const PosX,PosY:integer;const ClickFlag:TClickType=vKeyclick);
(*Simulate keyboard keys*)
procedure SendKey(const WinHandle:HWND;const Vkey:word;const KeyClickFlag:TClickType=vkeyDown);
procedure SendComBoKey(const CtrlKey,FnKey:word);//For example: send ALT+F4
//------------------------
{Draw a straight line on the specified chart control and return the index where the mouse is located}
Function ChartMoveLine(Chart:Tobject;MousePos_X:Integer;LineColor:TColor=clRed):integer;
procedure DataToExcelCSV(SaveFileName:string;DataSet:TDataSet;ShowCompleteBoX:Boolean=True;GroupCount:integer=1);
(*---------Sound DoBeep sound----------*)
// procedure Destroy;
{------------------------------------------------- ----------------------------------
Author: Phoenix ^^me Part of the code provided by a good friend Date: 2004.03.31
-------------------------------------------------- --------------------------}
//Convert the data to an Excel file. Fields whose visible value is False in TDataSet are not added. // function DataToExcel(myExcelName: String; myDataSet: TDataSet): Boolean;
function ToBigRMB(RMB: string): string; //Convert lowercase amount to uppercase function IsRightDate(mInputDate:String):Boolean;//Whether the entered date is correct//The string is simply encrypted and decrypted when the function key=1 is encrypted, 0 To decrypt, use the xor operation function Decrypt(const s: string; key:Byte=1): string;
function RightCopy(S: string; Index,count:Integer): string; //Copy Count characters from the right Index position