Delphi

Delphi 非主窗体(即子窗体)在任务栏显示按钮
Delphi

Delphi 非主窗体(即子窗体)在任务栏显示按钮

26 0

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

Delphi

Delphi 中拖动无边框窗口的5种方法

66 0

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

Delphi

delphi 遍历所有Edit控件

53 0

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

Delphi

delphi 获取中文/数字星期的函数

47 0

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

Delphi

delphi 取得固定长度的随机字符串

29 0

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;

Delphi

delphi 简单的日志记录

51 0

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

Delphi

delphi 设置本地系统时间

51 0

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&

Delphi

delphi String转换成TStrings

119 0

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