Delphi

Delphi

Delphi Inputbox 输入时显示*号

48 0

unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls;const InputboxMessage = WM_USER + 200; //定义消息typeTForm1 = class(TForm)Button1: TButton;procedure Button1Click(Sender: TObject);private{

Delphi

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

37 0

利用DELPH 的ICMP控件检测服务器地址function CheckNetServer():Boolean;begin IdIcmpClient1.Host := '192.168.1.230'; //服务器地址 IdIcmpClient1.Ping; if IdIcmpClient1.ReplyStatus.BytesReceived <= 0 then result:=False else begin result:=True; exit;

Delphi

Delphi 使控件变成圆角的方法

44 0

procedure RoundControl(Control: TWinControl; arc1, arc2: Integer);var R: TRect; Rgn: HRGN;begin with Control do begin R := Control.ClientRect; Rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, arc1, arc2); Perform(EM_GETRECT, 0, l

Delphi

Delphi CheckListBox 用法

80 0

for i := CheckListBox1.Items.Count-1 downto 0 do //从后面往前面删 begin if CheckListBox1.Checked[i] then // 是否选中 begin CheckListBox1.Items.Delete(i); end; end;获取选中的名称: clbCol.Items[clbCol.ItemIndex]

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

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

34 0

1、定义一个全局变量保存显示到标题栏的字符串,strScroll: Widestring = '风行天下 - By WindSon ';2、添加一个Timer控件,设置属性Interval := 300; Enabled:=True;3、然后添加Timer事件复制代码procedure TForm1.Timer1Timer(Sender: TObject);var strTrim: Widestring;begin strTrim := copy(strScroll, 1, 1);

Delphi

Delphi 让窗体自适应屏幕显示

159 0

unit Unit1;interfaceusesWinapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,Vcl.Controls, Vcl.Forms, Vcl.Dialogs,Typinfo, Vcl.StdCtrls;typeTForm1 = class(TForm)Button1: TButton;procedure FormCreate(Sender: TObj

Delphi

Delphi MEMO 循环往上往下滚动

38 0

// 循环往上滚动 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_VSCROLL,SB_LINEDOWN,0); end;// 执行到底 SendMessage(Memo1.Handle, EM_SCROLL, SB_BOTTOM, 0);//一步一步往下走 SendM