var
Form1: TForm1;
exeh:hwnd;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
exeh:=ShellExecute (handle,'open','explorer.exe','http://www.5566.org','',SW_SHOW);
end;procedure TForm1.Button2Click(Sender: TObject);
begin
PostMessage(exeh,WM_CLOSE,0,0);
end;end.
Form1: TForm1;
exeh:hwnd;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
exeh:=ShellExecute (handle,'open','explorer.exe','http://www.5566.org','',SW_SHOW);
end;procedure TForm1.Button2Click(Sender: TObject);
begin
PostMessage(exeh,WM_CLOSE,0,0);
end;end.
解决方案 »
- 自己都觉得感动啊,耗时将近1年,通过辛勤的接分,终于闹了个4个三角啊
- 读取 xml 字节点问题
- 我打算近一段去深圳了,希望了解一下情况!十分感激!
- 我的Windows2000默认的排序为倒序,到底是怎么回事?
- 谁有x.25协议包的格式?
- 风格和逛街就
- 请教! Delphi如何获取Uncode版本的快捷方式路经? Delphi的ShlOjb接口定义有错?
- 谁能告诉我UTF8的格式?好像有位叫江雪(rivsnow)知道。
- 请教如何定义一个应用级的全局变量,使一个应用程序的各个模块均能存取该变量
- 看一下TGraphicControl继承下来的控件难题怎解决
- 本身装有delphi7,要再安装delphi5开一个以前的程序,却装不上了,怎么办。
- 我想知道安装程序的制作原理!
begin
ShellExecute(handle,'open','explorer.exe','http://www.5566.org','',SW_SHOW);
end;procedure TForm1.Button2Click(Sender: TObject);
begin
exeh := FindWindow('ieframe',nil);
PostMessage(exeh,WM_CLOSE,0,0);
end;
ShellExecute(handle,'open','explorer.exe','http://www.5566.org','',SW_SHOW);最后一个参数根本就没有作用 我换成SW_HIDE窗口还是显示的,TMD不能隐藏 只好改用WINEXEC了
DELPHI要我怎么求救你
下面是它返回值的含义:
0 The operating system is out of memory or resources.
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).
SE_ERR_ACCESSDENIED The operating system denied access to the specified file.
SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
SE_ERR_DDEBUSY The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed.
SE_ERR_DDEFAIL The DDE transaction failed.
SE_ERR_DDETIMEOUT The DDE transaction could not be completed because the request timed out.
SE_ERR_DLLNOTFOUND The specified dynamic-link library (DLL) was not found.
SE_ERR_FNF The specified file was not found.
SE_ERR_NOASSOC There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.
SE_ERR_OOM There was not enough memory to complete the operation.
SE_ERR_PNF The specified path was not found.
SE_ERR_SHARE A sharing violation occurred.
当你使用一个不是很了解的Windows API的时候,最好上MSDN看看。