Delphi Base

WindSon

导航

2020年3月25日 #

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

摘要: type TForm2 = class(TForm) private { Private declarations } public { Public declarations } procedure CreateParams(var Params:TCreateParams); override; 阅读全文

posted @ 2020-03-25 21:17 windsonvip 阅读(282) 评论(0) 推荐(0) 编辑

Delphi 时间控制窗口标题栏文字或任务栏标题文字滚动

摘要: 1、定义一个全局变量保存显示到标题栏的字符串,strScroll: Widestring = '风行天下 - By WindSon '; 2、添加一个Timer控件,设置属性Interval := 300; Enabled:=True; 3、然后添加Timer事件 procedure TForm1. 阅读全文

posted @ 2020-03-25 21:03 windsonvip 阅读(530) 评论(0) 推荐(0) 编辑

Delphi MEMO 循环往上往下滚动

摘要: // 循环往上滚动 if Memo1.Perform(EM_SCROLL,SB_LINEDOWN,0)=0 then begin Memo1.Perform(WM_VSCROLL,SB_TOP,0); end else begin SendMessage(Memo1.Handle,WM_VSCROL 阅读全文

posted @ 2020-03-25 20:38 windsonvip 阅读(751) 评论(0) 推荐(0) 编辑

Delphi 多线程使用

摘要: 1. 定义线程类 type TMyThread = class(TThread) private { Private declarations } fPos:Integer; // 变量 protected procedure GetMailList; procedure UpdatepBar; / 阅读全文

posted @ 2020-03-25 20:23 windsonvip 阅读(348) 评论(0) 推荐(0) 编辑

Delphi CheckListBox 用法

摘要: for i := CheckListBox1.Items.Count-1 downto 0 do //从后面往前面删 begin if CheckListBox1.Checked[i] then // 是否选中 begin CheckListBox1.Items.Delete(i); end; en 阅读全文

posted @ 2020-03-25 20:15 windsonvip 阅读(599) 评论(0) 推荐(0) 编辑

Delphi edit只允许输入数字

摘要: if not (key in ['0'..'9',#8]) then key := #0; 阅读全文

posted @ 2020-03-25 20:07 windsonvip 阅读(1176) 评论(0) 推荐(0) 编辑

2020年3月24日 #

Delphi 判断字符是否是汉字

摘要: function IsHZ(ch: WideChar): boolean; var i: Integer; begin i := Ord(ch); if (i < 19968) or (i > 40869) then result := False else result := True; end; 阅读全文

posted @ 2020-03-24 21:55 windsonvip 阅读(529) 评论(0) 推荐(0) 编辑

Delphi 判断当前系统是否64位

摘要: uses Winapi.Windows; function IsWin64: Boolean; var IsWow64Process: function(Handle: THandle; var Res: BOOL): BOOL; stdcall; GetNativeSystemInfo: proc 阅读全文

posted @ 2020-03-24 21:52 windsonvip 阅读(527) 评论(0) 推荐(0) 编辑

Delphi 使控件变成圆角的方法

摘要: procedure RoundControl(Control: TWinControl; arc1, arc2: Integer); var R: TRect; Rgn: HRGN; begin with Control do begin R := Control.ClientRect; Rgn : 阅读全文

posted @ 2020-03-24 21:40 windsonvip 阅读(757) 评论(0) 推荐(0) 编辑

2020年3月23日 #

Delphi使程序的窗口出现在最前面并激活

摘要: procedure setAppFront(); //使程序的窗口出现在最前面并激活 var pt, OldPt, NewPt: TPoint; begin //判断Application是否最小化,而不是主窗口的Handle, 使用Restore来还原 if IsIconic(Applicatio 阅读全文

posted @ 2020-03-23 20:09 windsonvip 阅读(761) 评论(1) 推荐(0) 编辑