Delphi
2022-12-21
26
type TForm2 = class(TForm) private { Private declarations } public { Public declarations } procedure CreateParams(var Params:TCreateParams);override; //添加过程 end;procedure TForm2.CreateParams(var Params: TCreateParams);begin inherited Create
2022-12-21
66
1.MouseMove事件中加入:// ReleaseCapture;// Perform(WM_SYSCOMMAND, $F017 , 0); 2.MouseDown事件中加入:// POSTMESSAGE(Self.Handle,WM_LBUTTONUP,0,0);// POSTMESSAGE(Self.Handle,274,61458,0); 3.MouseDown事件中加入:// ReleaseCapture;// Perform(WM_SYSCOMMAND, $F012, 0); 4.截获WM
2022-12-21
53
unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm1 = class(TForm) Label1: TLabel; Edit1: TEdit; Edit2: TEdi
2022-12-21
47
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
2022-12-21
29
unit Unit1;interfaceuses System.Hash, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;type TForm1 = class(TForm) ListBox1: TListBox;
2022-12-21
51
procedure SaveSoldierLog(const sMessage:string);var fn:string; sList:TStrings;begin fn := ExtractFilePath(ParamStr(0))+'soft.Log'; sList := TStringList.Create; try if FileExists(fn) then sList.LoadFromFile(fn); if sList.Count>1
2022-12-21
51
function SetLocalSysTime(const newTime:TDateTime):Boolean; //设置本地系统时间var MyTime:TsystemTime;begin FillChar(MyTime,sizeof(MyTime),#0); MyTime.wYear := StrToInt(FormatDateTime('yyyy', newTime)); MyTime.wMonth := StrToInt(FormatDateTime('mm&
2022-12-21
119
function StringsToStr(const vList:TStrings):string;var i:Integer;begin Result := ''; for i:=0 to vList.Count-1 do begin if Result <> '' then Result := Result+'#'+vList.Strings[i] else Result := vList.Stri