老产品维护问题,
Delphi 版本:delphi6如果新建一个Application,
用一下Code可以获得正确的Handleprocedure TForm1.Button1Click(Sender: TObject);
var
EVMHandle:HWND;
EVMTitle: String;
begin
EVMHandle:=FindWindow(nil,'console');
Showmessage(inttostr(EVMHandle));
end;
但如果写一个delphi service application,
返回的handle值一直是0procedure TSvcChkHandle.ServiceStart(Sender: TService;
var Started: Boolean);
var
EVMHandle: HWND;
begin
try
Coinitialize(nil);
EVMHandle:=FindWindow(nil,'console');
Writelog(inttostr(EVMHandle));
Started := True;
except
On E: Exception do LogMessage(E.Message);
end;
end;console 是我一个应用程序的窗口标题在线等,谢谢
Delphi 版本:delphi6如果新建一个Application,
用一下Code可以获得正确的Handleprocedure TForm1.Button1Click(Sender: TObject);
var
EVMHandle:HWND;
EVMTitle: String;
begin
EVMHandle:=FindWindow(nil,'console');
Showmessage(inttostr(EVMHandle));
end;
但如果写一个delphi service application,
返回的handle值一直是0procedure TSvcChkHandle.ServiceStart(Sender: TService;
var Started: Boolean);
var
EVMHandle: HWND;
begin
try
Coinitialize(nil);
EVMHandle:=FindWindow(nil,'console');
Writelog(inttostr(EVMHandle));
Started := True;
except
On E: Exception do LogMessage(E.Message);
end;
end;console 是我一个应用程序的窗口标题在线等,谢谢
解决方案 »
- RSA算法1024位,随机数、公密钥和模数加密后产生16进制密钥
- delphi+sybase问题。关于cursor
- 请问TValueListEditor::RestoreCurrentRow()如何使用?
- delphi2010 designintf
- 怎么把string转成widestring?
- 为什么打不开??
- 简单的问题
- 突然不可以用 'F12' 从 'program edit mode' 进入 'form view mode'.
- 怎么实现论坛贴吧自动发贴
- 请问PARADOX数据库在哪里可以定义主外键,以及是否支持级连删除?
- delphi2007运行的时候默认打开的网页,可以不让他默认打开吗?
- 托盘程序不能关闭
,但XP或者更高版本有问题,我在网上查到很多类似问题,但还没有解决我目前问题的方法。谢谢关注,请继续支招。