文件名称:Delphi操作InputBoxSetPasswordChar变成密码框示例源码.rar
文件大小:6KB
文件格式:RAR
更新时间:2022-07-30 11:00:49
Delphi源码-界面编程
对InputBoxSetPasswordChar操作: procedure TForm1.InputBoxSetPasswordChar(var Msg: TMessage); var hInputForm, hEdit: HWND; begin hInputForm := Screen.Forms[0].Handle; if (hInputForm <> 0) then begin hEdit := FindWindowEx(hInputForm, 0, 'TEdit', nil); SendMessage(hEdit, EM_SETPASSWORDCHAR, Ord('*'), 0); end; end; procedure TForm1.Button1Click(Sender: TObject); var InputString: string; begin PostMessage(Handle, InputBoxMessage, 0, 0); InputString := InputBox('密码', '请输入相关密码:', ''); Edit1.Text := InputString; end;
【文件预览】:
srcfans.com
----TextBox()
--------Unit1.ddp(51B)
--------Project1.res(876B)
--------Unit1.dcu(4KB)
--------Unit1.dfm(677B)
--------Project1.cfg(434B)
--------Project1.dpr(188B)
--------Project1.dof(2KB)
--------Unit1.pas(1KB)