Delphi
2022-11-11
32
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));
2022-11-11
22
原理很简单,在字的坐上、上、右上 、左、右、左下、下、右下分别使用边界颜色写一遍字,即生成背景,然后写最终的字,下面是代码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, '
2022-11-11
106
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
2022-11-11
146
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
2022-11-11
30
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
2022-11-11
106
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
2022-11-11
46
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&
2022-11-10
51
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