Delphi 将listview保存为TXT
var lList: Tstrings; i: integer;begin lList:= TStringList.Create; try for i:=0 to ListView.Items.Count -1 do LList.add(listview1.items[i].caption + '|' + listview1.items[i].subitems.strings[0] +'|' + listview1.items[i].subi
var lList: Tstrings; i: integer;begin lList:= TStringList.Create; try for i:=0 to ListView.Items.Count -1 do LList.add(listview1.items[i].caption + '|' + listview1.items[i].subitems.strings[0] +'|' + listview1.items[i].subi
FirDAC 对 SQLite 数字, int64也会被截断,会出现负数情况处理FirDAC 对 SQLite 数字, int64也会被截断,会出现负数情况处理 先用以下方法设置一下var MR: TFDMapRule;begin FDQuery1.FormatOptions.OwnMapRules:= True; MR:= FDQuery1.FormatOptions.MapRules.Add; MR.SourceDataType:= dtInt32; MR.TargetDataTyp
unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private d
function IsPresentInList(strings: TStrings; const value: string): Boolean;var i: Integer;begin Result := False; for i := 0 to strings.Count - 1 do if SameText(strings[i], value) then Exit(True);end;procedure TForm1.Button1Click(Sender: TObject);beginif I
Enable DEP and ASLR flags on a Delphi XE+ executable:unit Unit1; //{$SetPEOptFlags $100} //to set the ASLR flag//{$SetPEOptFlags $40} //to set the DEP flag{$SetPEOptFlags $140} //to set both DEP + ASLR in one lineStatically analyze Windows exe files (onl
procedure TForm1.FormCreate(Sender: TObject);begin KeyPreview := true;end;procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);begin if Key = #27 then Close;end;
uses Windows, SysUtils;function GetShortName(sLongName: string): string;var sShortName : string; nShortNameLen : integer;begin SetLength(sShortName, MAX_PATH); nShortNameLen := GetShortPathName( PChar(sLongName), PChar(sShortName), MAX_PATH -
unit Unit2;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm2 = class(TForm) Memo1: TMemo; Button1: TButton; Edit1: TEd