如何得到某一个窗口的文本框的句柄,并写入相应的值,急!!! 比如得到QQ上的文本框句柄,并写入相应的值 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 文本框也是窗口,SetWindowsText() SendMessage(vHandle, EM_REPLACESEL, 0, Integer(PChar('Zswang 路过'))); project1:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TFormMain = class(TForm) Edit1: TEdit; private { Private declarations } public { Public declarations } end;var FormMain: TFormMain;implementation{$R *.dfm}end.//-------------------------project2:procedure TForm1.Button1Click(Sender: TObject);var h,h1:THandle;begin h:=FindWindow(nil,'FormMain'); IF h>0 then begin h1:=FindWindowEx(h,0,nil,'Edit1'); if h1>0 then begin SendMessage(h1, EM_REPLACESEL, 0, Integer(PChar('紧跟着 Zswang 路过'))); end; end;end; 非常感谢各位!!!还有一个问题:我如何在Project1中得到Project2.FormMain.EDIT1的Text.还有Project2.FormMain.Lable1的Caption呢? uses 6樓的代碼後再FindWindow相應的project窗體控件不行嗎? Edit只要知道句柄就可以通过WM_GETTEXT消息获取,但Label非Windows标准控件,得用hook植入到所在进程获取。以前专门讨论过:http://topic.csdn.net/t/20060618/13/4828247.html你可以搜索关键字:“Delphi 其他进程 hook 内容”参考链接:Hook其他程序中的StringGrid的内容 非常感谢,对于TEXT的操作现在没问题我也看完了http://topic.csdn.net/t/20060618/13/4828247.html , 以及参考链接:Hook其他程序中的StringGrid的内容 有基本上的思路,<Hook其他程序中的StringGrid的内容>但不能下载。能EMAIL给我吗?[email protected] 实在不好意思,最还有一个问题:我如何在Project1中按下到Project2.FormMain.Button1? 11楼 zswang 给俺也发一个,谢谢!! hook技术相当于在该进程执行代码,你只要找到Button1实例即可调用Button1.Click方法。 只有这个思路吗,能否控制MOUSE动作 -_-!!!控制mouse?模拟鼠标点击吗?mouse_event(MOUSEEVENTF_LEFTDOWN, 0,0,0,0);mouse_event(MOUSEEVENTF_LEFTUP, 0,0,0,0);控制鼠标位置?Mouse.CursorPos := Point(1, 1);事件上如果通过hook直接把onmousemove等事件重新指向....你也4个裤衩了,应该会举一反三吧。 邮件没有收到,能否再发至[email protected]================非常感谢, 对于TEXT的操作现在没问题 我也看完了http://topic.csdn.net/t/20060618/13/4828247.html , 以及参考链接:Hook其他程序中的StringGrid的内容 有基本上的思路, <Hook其他程序中的StringGrid的内容>但不能下载。能EMAIL给我吗?[email protected] 请教delphi写webservices客户端,参数为结构体数组,如何定义! 时机已经成熟,再加上一个有意义点的求婚就可大功告成,请大富翁们帮忙想个DEMO!!(60大洋) 寻找合作伙伴共同开发 fastreport的打印纸张设置问题!在线等!解决既结贴! 【求助】为什么断点不起作用? 怎么让StringGrid的内容居右或居中 一个菜鸟问题 treeview的问题 能帮我一下吗 我下载的《delphi5开发人员指南》为什么阅读时出现问题? adoquery 再次 close,open,以后,如何保持dbgrideh列不变? 蹩脚问题:控件始终在最上的实现?
SetWindowsText()
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TFormMain = class(TForm)
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;var
FormMain: TFormMain;implementation{$R *.dfm}end.//-------------------------project2:
procedure TForm1.Button1Click(Sender: TObject);
var
h,h1:THandle;
begin
h:=FindWindow(nil,'FormMain');
IF h>0 then
begin
h1:=FindWindowEx(h,0,nil,'Edit1');
if h1>0 then
begin
SendMessage(h1, EM_REPLACESEL, 0, Integer(PChar('紧跟着 Zswang 路过')));
end;
end;
end;
以前专门讨论过:http://topic.csdn.net/t/20060618/13/4828247.html你可以搜索关键字:“Delphi 其他进程 hook 内容”参考链接:Hook其他程序中的StringGrid的内容
对于TEXT的操作现在没问题
我也看完了http://topic.csdn.net/t/20060618/13/4828247.html , 以及参考链接:Hook其他程序中的StringGrid的内容
有基本上的思路,<Hook其他程序中的StringGrid的内容>但不能下载。能EMAIL给我吗?[email protected]
还有一个问题:我如何在Project1中按下到Project2.FormMain.Button1?
mouse_event(MOUSEEVENTF_LEFTDOWN, 0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP, 0,0,0,0);控制鼠标位置?
Mouse.CursorPos := Point(1, 1);事件上如果通过hook直接把onmousemove等事件重新指向....你也4个裤衩了,应该会举一反三吧。
非常感谢,
对于TEXT的操作现在没问题
我也看完了http://topic.csdn.net/t/20060618/13/4828247.html , 以及参考链接:Hook其他程序中的StringGrid的内容
有基本上的思路, <Hook其他程序中的StringGrid的内容>但不能下载。能EMAIL给我吗?[email protected]