Delphi

Delphi

Delphi 得到一个cuid用户唯一标识

32 0

uses Nb30;function NBGetAdapterAddress(ID: integer): String; //用于得到一个cuid用户唯一标识Var NC: TNCB; ADAPTE: TADAPTERSTATUS; LANAENU: TLANAENUM; intId: integer; cR: AnsiChar; strTem: String;Begin Result := ''; Try ZeroMemory(@NC, SizeOf(NC));

Delphi

delphi 实现给字加边界代码

22 0

原理很简单,在字的坐上、上、右上 、左、右、左下、下、右下分别使用边界颜色写一遍字,即生成背景,然后写最终的字,下面是代码procedure TForm1.Button1Click(Sender: TObject);var tc : TCanvas;begin tc := Label1.Canvas; tc.Font.Color := RGB(0, 255, 0); //背景颜色 tc.TextOut(0, 0, 'abc'); tc.TextOut(0, 1, '

Delphi

Delphi Android使用idhttp.get抓取https(SSL)文件

106 0

uses IdSSLOpenSSL,idhttp;function HttpsAuthGet(Url, Username, Password: string):string;var ssl: TIdSSLIOHandlerSocketOpenSSL; http: TIdHTTP;begin http := TIdHttp.Create(nil); try ssl := TIdSSLIOHandlerSocketOpenSSL.Create(nil); try http.IO

Delphi

Delphi获取文件创建时间、文件最后修改时间

146 0

procedure TForm1.Button1Click(Sender: TObject);//获取文件创建时间var FileName: string; ti: Integer; dt: TDateTime;begin FileName := 'D:\test\Test.txt'; ti := FileAge(FileName); ShowMessage(IntToStr(ti)); //返回: 1030115371, 需要转换 dt := FileDateToDat

Delphi

Delphi REST API Post Sample

30 0

procedure TForm1.Button1Click(Sender: TObject);var jsonToSend: TStringList; http: TIdHTTP;begin http := TIdHTTP.Create(nil); try http.HandleRedirects := True; http.ReadTimeout := 5000; jsonToSend := TStringList.create; try jsonToSend

Delphi

Delphi 获取百度ai 获取token

106 0

var idhttp2:Tidhttp; authHost:string; tokSl:Tstringlist;begin authHost:= 'http://aip.baidubce.com/oauth/2.0/token'; try tokSl:=Tstringlist.Create; idhttp2:=Tidhttp.Create(nil); toksl.Add('grant_type=' + grant_type); toksl.Ad

Delphi

Delphi FireDAC 下的 Sqlite 创建数据库

46 0

if not FileExists('serdb.sdb') then //判断数据库文件是否存begin con1.Params.Add('DriverID=SQLite');//'DriverID=SQLite'之间不能有任何空格 con1.Params.Add('Database=serdb.sdb'); //如果文件存在就打开, 不存在就建立 con1.Params.Add('LockingMod=Exclusive&

Delphi

delphi 10.2 创建并使用资源文件

51 0

windows支持以下资源格式://下面是 Windows 支持的资源格式:RT_CURSOR = MakeIntResource(1);RT_BITMAP = MakeIntResource(2);RT_ICON = MakeIntResource(3);RT_MENU = MakeIntResource(4);RT_DIALOG = MakeIntResource(5);RT_STRING = MakeIntResour