*****五星级问题***** 用ShellExecute 打开一个IE页面后,IE成了被激活的窗体了,如何在程序中打开一个IE连接后,让程序仍然保持激活状态。愁啊,兄弟们! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你在ShellExecute 之后,加上下面的代码:SetForegroundWindow(Handle); procedure TForm1.Button1Click(Sender: TObject);begin ShellExecute(self.Handle,'open','http://community.csdn.net/Expert/topic/4692/4692400.xml?temp=.702984','','',SW_SHOWNOACTIVATE); BringToFront;end; procedure SwitchToThisWindow(h1: hWnd; x: bool); stdcall; external user32 Name 'SwitchToThisWindow'; {x = false: Size unchanged, x = true: normal size}procedure TForm1.Button2Click(Sender: TObject);begin ShellExecute(....... ... Application.ProcessMessage; SwitchToThisWindow(FindWindow('notepad', nil), True);end; SwitchToThisWindow(Application.Handle, true); handle: THandle;begin ShellExecute(Handle,'open',pchar('http://mail.tom.com'), '','',SW_SHOWNOACTIVATE); handle := GetActiveWindow; sleep(1000); //handle := GetForegroundWindow; SetForegroundWindow(handle);我搞定了。谢谢各位了 to:aiirii(ari-http://spaces.msn.com/members/aiirii/)这个函数是API嘛,我怎么无法使用呢? 如何让已经隐藏的主窗体显示出来 急问,立即给分,XML->SQL server2000导入 这样的C++声明,能否在OO PASCAL中实现? 急救啊,我想要作一个数据库转换的东西,100分求解,如果不够,再开 很简单的问题:如何理解strpos这个函数?能否举个例题? 能用adoconnection.execute()创建一个表吗? fastreport乱出纸 三层结构 给大家推荐一个网站哦www.gmember.com 幽盟最新更新 有关interbase的序列号??? delphi可以实现类似oa这样的公文流转的功能吗? 有谁装过crystal report 9.2
SetForegroundWindow(Handle);
begin
ShellExecute(self.Handle,'open','http://community.csdn.net/Expert/topic/4692/4692400.xml?temp=.702984','','',SW_SHOWNOACTIVATE);
BringToFront;
end;
external user32 Name 'SwitchToThisWindow';
{x = false: Size unchanged, x = true: normal size}
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(.......
... Application.ProcessMessage; SwitchToThisWindow(FindWindow('notepad', nil), True);
end;
begin
ShellExecute(Handle,'open',pchar('http://mail.tom.com'), '','',SW_SHOWNOACTIVATE); handle := GetActiveWindow; sleep(1000);
//handle := GetForegroundWindow;
SetForegroundWindow(handle);
我搞定了。谢谢各位了
这个函数是API嘛,我怎么无法使用呢?