我不知道那个EDIT的属性???
是不是要用到SOFTICE去跟踪到那个EDIT的句柄?
得到句柄后就能发送字符串?
是不是要用到SOFTICE去跟踪到那个EDIT的句柄?
得到句柄后就能发送字符串?
解决方案 »
- 在Object Inspector 中看到ADOTable 组件的Connection属性。而ADOTable组件源代码里为什么没有写?
- 如何使MDI子窗口在最大化时,右上角只显示关闭按钮?!(如Word一样)
- 高分求注册版的FastReport!
- 零分,今天才发现身边一个朋友都没有,好幸福!!!开心。
- 如何在StringGrid中设置其中一行的字体格式、颜色等?
- 事务控制的问题:(急)
- 帮我看看这样的SQL语句怎么写?
- 我以前是用pb的想转到delphi,应该如何学习才能速成.有没有好的电子书推荐一下.
- NMSMTP怎样收邮件?
- --------- ADO 问题挑战 DELPHI50 + INFORMIX !! ------------
- 请问下delphi中像下面这种界面怎么做?
- 请问怎样让用户自由地移动DBGrid各列的顺序?(就像StringGrid一样可以用拖拉的方式)
H:HWND;
begin
H:=FindWindow(nil,'aaa'); //查找目标窗口
H:=FindWindowEx(H,0,'TEdit',nil);// 查找目标控件
if H<>0 then
sendmessage(H,WM_SETTEXT,0,lparam(PChar(Edit1.Text)));
end;
然后另一支程序用paramstr(1)來接收消息就可以了
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Edit1: TEdit;
procedure FormCreate(Sender: TObject);
private
aatom:atom;
procedure hotkey(var msg:tmessage);message wm_hotkey;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
aatom:=globaladdatom('hotkey');
RegisterHotKey(handle,aatom,MOD_ALT,vk_F12);
end;
procedure TForm1.hotkey(var msg:tmessage);
var p:Tpoint;
curwin:hwnd;
begin
if (msg.LParamHi=VK_F12) and (msg.LParamLo=MOD_ALT) then
begin
getcursorpos(p);
curwin:=windowfrompoint(p);
sendmessage(curwin,wm_settext,0,integer(pchar('hello')));
end;
end;
end.
//思路,取得鼠标当前位置控件的句柄,定义一个热键(alt+F12),热键激活sendmessage给句柄坐在的控件发送命令设置内容//注:对于IE输入框无效
然后取得该控件的句柄csdn有自动扫雷的程序下载,原理差不多