Delphi Base

WindSon

导航

2020年3月24日 #

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 阅读(589) 评论(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 阅读(864) 评论(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 阅读(802) 评论(1) 推荐(0)

Delphi 禁止重复运行程序的方法

摘要: 第一种方法,使用“过程调用” procedure Del; // 自定义过程 var Mutex: THandle; begin Mutex := CreateMutex(nil, True, PChar(Application.Title)); if GetLastError = ERROR_AL 阅读全文

posted @ 2020-03-23 19:54 windsonvip 阅读(664) 评论(1) 推荐(0)

2020年3月21日 #

delphi 让执行程序不在任务栏显示

摘要: Application.MainFormOnTaskbar := False; procedure TForm1.FormShow(Sender: TObject); begin ShowWindow(Application.Handle, SW_HIDE); //不显示在任务栏上 end; 阅读全文

posted @ 2020-03-21 21:30 windsonvip 阅读(640) 评论(0) 推荐(0)

2020年3月18日 #

Delphi WebBrowser内核版本修改D7

摘要: private { Private declarations } public { Public declarations } function WriteAppNameToReg:Boolean; function GetIEVersionStr: string; function IsWin64 阅读全文

posted @ 2020-03-18 23:34 windsonvip 阅读(501) 评论(0) 推荐(0)

Delphi让网页只允许在WebBrowser里面打开

摘要: [添加组件] 添加 Internet->WebBrowser //显示网页 [添加事件] 鼠标点击WebBrowser组件,在Events事件选项框中找到. OnNewWindows2,OnStatusTextChange.双击添加事件. unit Unit1; interface uses Win 阅读全文

posted @ 2020-03-18 22:54 windsonvip 阅读(486) 评论(0) 推荐(0)

2020年3月16日 #

Delphi 判断操作系统是32位或是64位

摘要: function IsWin64: Boolean; var Kernel32Handle: THandle; IsWow64Process: function(Handle: Windows.THandle; var Res: Windows.BOOL): Windows.BOOL; stdcal 阅读全文

posted @ 2020-03-16 22:14 windsonvip 阅读(1061) 评论(0) 推荐(0)

Delphi Inputbox 输入时显示‘*’号

摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; const InputboxMessage = WM_US 阅读全文

posted @ 2020-03-16 18:11 windsonvip 阅读(563) 评论(0) 推荐(0)

Delphi 让窗体自适应屏幕显示

摘要: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, V 阅读全文

posted @ 2020-03-16 17:52 windsonvip 阅读(860) 评论(0) 推荐(0)