Delphi Base

WindSon

导航

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 阅读(962) 评论(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 阅读(526) 评论(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 阅读(809) 评论(0) 推荐(0) 编辑

delphi 弹出输入框的InputQuery, InputQuery 函数用法

摘要: delphi 弹出输入框的InputQuery, InputQuery 函数用法 procedure TForm1.Button1Click(Sender: TObject); var str: string; begin str := InputBox('输入窗口标题', '输入提示', '默认输 阅读全文

posted @ 2020-03-16 17:48 windsonvip 阅读(1166) 评论(0) 推荐(0) 编辑

delphi Wmi 获取操作系统信息

摘要: uses ActiveX, ComObj; function GetWMIProperty(WMIProperty: string): string; var Wmi, Objs, Obj: OleVariant; Enum: IEnumVariant; C: Cardinal; begin Wmi 阅读全文

posted @ 2020-03-16 17:46 windsonvip 阅读(610) 评论(0) 推荐(0) 编辑

DELPHI 检测服务器地址是否有效

摘要: 利用DELPH 的ICMP控件检测服务器地址 function CheckNetServer():Boolean; begin IdIcmpClient1.Host := '192.168.1.230'; //服务器地址 IdIcmpClient1.Ping; if IdIcmpClient1.Re 阅读全文

posted @ 2020-03-16 17:43 windsonvip 阅读(264) 评论(0) 推荐(0) 编辑

Delphi 动态生成进度条窗体

摘要: 在implementation加入下面 uses Gauges; var Gauge1: TGauge; 加入Timer1控件,设为false procedure TForm1.Button1Click(Sender: TObject); var form2: TForm; begin form2 阅读全文

posted @ 2020-03-16 17:38 windsonvip 阅读(984) 评论(0) 推荐(0) 编辑

Delphi 执行一个外部程序,当外部程序结束后言主程序立即响应

摘要: delphi 执行一个外部程序,当外部程序结束后言主程序立即响应 我们经常能看到360安全卫士进行windows系统升级时,执行windows升级程序,当升级程序执行完成后,360马上弹出提示框。这样的程序是如何做到的呢?下述代码就能完成! uses shellAPI; procedure TFor 阅读全文

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

delphi获取DOS命令行输出函数 运行CMD命令并获取结果

摘要: procedure TForm1.Button4Click(Sender: TObject); var hReadPipe,hWritePipe:THandle; si:STARTUPINFO; lsa:SECURITY_ATTRIBUTES; pi:PROCESS_INFORMATION; mDo 阅读全文

posted @ 2020-03-16 17:23 windsonvip 阅读(1718) 评论(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-16 17:22 windsonvip 阅读(280) 评论(0) 推荐(0) 编辑

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-16 17:20 windsonvip 阅读(196) 评论(0) 推荐(0) 编辑

delphi获得唯一ID字符串

摘要: //这是我三层开发中常用的一个函数,直接调用CreateSortID uses System.Win.ComObj,System.RegularExpressions,System.StrUtils,System.SysUtils; function CreateID(ll: Integer): s 阅读全文

posted @ 2020-03-16 17:18 windsonvip 阅读(708) 评论(0) 推荐(0) 编辑

MD5加密BASE64加解密

摘要: MD5需要引入system.Hash,BASE64需要引入System.NetEncoding,这两个单元应该只有高版本的DELPHI IDE才有 (貌似XE5以上版本才有)。如果是D7的话,找第三方的库。 procedure TForm19.Button8Click(Sender: TObject 阅读全文

posted @ 2020-03-16 17:16 windsonvip 阅读(1310) 评论(0) 推荐(0) 编辑

cxDBTreeList:最简单的节点图标添加方法

摘要: 先在窗体上放ImageList关联到cxDBTreeList,在cxDBTreeList的GetNodeImageIndex事件中写如下: procedure cxDBTreeList1GetNodeImageIndex(Sender: TcxCustomTreeList; ANode: TcxTr 阅读全文

posted @ 2020-03-16 17:13 windsonvip 阅读(435) 评论(0) 推荐(0) 编辑

dxTabbedMDIManager1关闭窗体

摘要: procedure TfrmJianKongXinXi.FormClose(Sender: TObject; var Action: TCloseAction);begin Action:=caFree;end; procedure TfrmJianKongXinXi.FormCloseQuery( 阅读全文

posted @ 2020-03-16 17:12 windsonvip 阅读(612) 评论(0) 推荐(0) 编辑

DEV插件--Spreadsheet1电子表格

摘要: 常用操作Spreadsheet常用属性标题栏是否可见 Spreadsheet1.TitleBar.Visible=true标题栏背景颜色 Spreadsheet1.TitleBar.Interior.Color="Green"标题栏标题内容 Spreadsheet1.TitleBar.Caption 阅读全文

posted @ 2020-03-16 17:11 windsonvip 阅读(763) 评论(0) 推荐(0) 编辑

如何让tcxGrid左边显示序号

摘要: 第一步: 设置cxgrid的属性, OptionsView.Indicator = True 第二步: 写OnCustomDrawIndicatorCell方法 procedure TForm1.cxGrid1DBTableView1CustomDrawIndicatorCell(Sender: T 阅读全文

posted @ 2020-03-16 17:09 windsonvip 阅读(606) 评论(1) 推荐(2) 编辑

批处理脚本自动以管理员权限运行

摘要: :::::::::::::::::::::::::::::::::::::::::::: :: Elevate.cmd - Version 4 :: Automatically check & get admin rights :::::::::::::::::::::::::::::::::::: 阅读全文

posted @ 2020-03-16 17:06 windsonvip 阅读(1037) 评论(0) 推荐(0) 编辑

Delphi编写的一款锁屏小工具

摘要: Delphi编写的一款锁屏小工具,双击程序立即锁屏,木有界面的。解除锁屏密码:alt+空格。 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, D 阅读全文

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

Delphi字符串加密解密函数

摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Bu 阅读全文

posted @ 2020-03-16 16:08 windsonvip 阅读(1006) 评论(0) 推荐(0) 编辑