delphi 模似键盘输入又一方法


本文整理自网络,侵删。

 //获取窗口句柄
EnumChildWindows(Hwindow,@LoginEnumWindowsProc,LongInt(self));

for i:=0 to chklst_Uid.Count-1 do
begin
if chklst_Uid.Checked[i] then
begin
SplitString(Trim(chklst_Uid.Items.Strings[i]),'-',a,b);
UidLogin:=Trim(a);
UidPassword:=Trim(b);
SendMessage(HLoginNum, WM_SETTEXT, 180, Integer(PChar(UidLogin)));
for j:=1 to 6 do
begin
mychar:=MidStr(UidPassword,j,1);
SendMessage(Hpass,WM_CHAR,Ord(mychar[1]),0);
end;

chklst_Uid.Checked[i]:=False;
lbl_LoginUid.Caption:=UidPassword;
Break;
end;
end;

文章来源于《傻猫网络日志》 http://www.samool.com/archives/11128/

相关阅读 >>

Delphi 解决Delphi indy10下 utf8码转换的问题

Delphi 程序动态改变皮肤

Delphi 中的自动引用计数使用规则

Delphi用idhttp提交自定义cookie

Delphi 实现英汉字典的转换

封装Delphi hook api

Delphi 检测用户超过多长时间没有操作键盘或鼠标

Delphi twebbrowser静音

Delphi 通用程序自动更新升级

Delphi ansicontainstext 是否包含子串

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...