Delphi

Delphi

Delphi 游戏测试CALL

29 0

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) GroupBox1: TGroupBox; Memo1: TMemo; Button1: TButton; Edit1: TEdit; Label1: TLabel; p

Delphi

DELPHI通过SPComm COM口发短信包括PUD编码解码

31 0

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, SPComm, Spin; type TForm1 = class(TForm) Comm1: TComm; Button1: TButton; Edit1: TEdit; Button2: TButton; Button3: T

Delphi

Delphi 串口常用的字符串转换函数

39 0

(*********************取16进制字符的10进制的integer值*******************)function HexToInt(HexStr:String):Integer;var i,TempInt,LocalInt:Integer;begin HexStr:=UpperCase(HexStr); LocalInt:=1; Result:=0; for i:=Length(HexStr) downto 1 do begin if HexStr[i]

Delphi

Delphi 计算运行耗时的方法2

25 0

private lStart : Longint; lEnd : Longint; procedure GetStartTime; procedure GetEndTime; function GetRunTimes : Double;publicend; /////////////////////procedure GetEndTime;begin lEnd := GetTickCount;end; function GetRunTimes: Double;begi

Delphi

delphi 长文件路径转换短文件路径

24 0

转换前:C:\Users\zhangshuai\Desktop\codesnip-develop\codesnip-develop转换后:C:\Users\ZhangSH~1\Desktop\CODESN~1\CODESN~1function LongToShortFilePath(const LongName: string): string;begin SetLength(Result, MAX_PATH); SetLength(Result, GetShortPathName(PChar(Lo

Delphi AnsiEndsText 用法之一(路径结尾自动加\)
Delphi

Delphi AnsiEndsText 用法之一(路径结尾自动加\)

39 0

引用单元:System.StrUtils首部 function AnsiEndsText(const ASubText, AText: string): Boolean; $[StrUtils.pas功能 返回字符串AText是否以子串ASubText结尾说明 不区分大小写参考 function Windows.CompareString例子 CheckBox1.Checked := AnsiEndsText(Edit1.Text, Edit2.Text);varStr:string;beginStr:

Delphi

Delphi StrToHexStr 字符串转换Hex

151 0

function StrToHexStr(const S:string):string;var I:Integer;begin for I:=1 to Length(S) do begin if I=1 then Result:=IntToHex(Ord(S[1]),2) else Result:=Result+' '+IntToHex(Ord(S[I]),2); end;end;

Delphi

Delphi HexToInt32

35 0

function HexToInt32(const aHex: string ):Integer;var I,L,K: Integer;begin Result := 0 ; if aHex ='' then begin Exit; end else begin K := 0; L := Length(aHex); for I:=1 to L do begin if (not(aHex[I]