uses后面有填写什么?才不出现“未申请的标示符”?(30分)

  • 主题发起人 monkey999
  • 开始时间
M

monkey999

Unregistered / Unconfirmed
GUEST, unregistred user!
老师,在表单中怎么使用超级连接,我知道连接邮件ShellExecute(handle,nil,
pchar('mailto:monkey999@163.net'),nil,nil,sw_shownormal);
但连接网页就不行了。
shellExecute(handle,nil,pchar('http://:http://go5.163.com/xdd924'),
nil,nil,sw_shownormal);该怎么办?

我发现在uses后面有Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ComCtrls, ToolWin, ImgList, FileCtrl,
ExtCtrls, OleCtrls, SHDocVw, Menus,Winsock,ComObj,Registry,WinINet;等等
每次我运行出错时都提示,“未申请的标示符”,然后在uses 后面加上某一个就可以了。
请问还可以接哪些,有没有一个专门的集合?
现在在initialization
OleInitialize(nil);
finalization
try
OleUninitialize;
except
end;中,就提示说OleInitialize是“未申请的标示符”,怎么办?
 
'http://:http://go5.163.com/xdd924'
改为
'http://go5.163.com/xdd924'

uses
ActiveX。
只用ShellExecute没有必要吧

-----
http://www.8421.org
 
shellExecute(handle,'open',pchar('http://www.163.com'),nil,nil,sw_shownormal);
 
什么该怎么办?
shellExecute(handle,nil,'http://go5.163.com/xdd924',
nil,nil,sw_shownormal);
 
qdyoung:你说的'http://:http://go5.163.com/xdd924'
改为'http://go5.163.com/xdd924' 我试过的,还是无效,
后面的回贴,我在试试。
 
把shellapi单元加到uses的最后
shellexecute(0,'open',pchar('go5.163.com/xdd924'),'','',sw_show);
绝对没有问题
 
Fanny501:
shellExecute(handle,'open',pchar('http://:http://go5.163.com/xdd924'),
nil,nil,sw_shownormal);
qdyoung:
shellExecute(handle,nil,'http://go5.163.com/xdd924',
nil,nil,sw_shownormal);
都不行。可以运行,没有连接。把http://换成mailto:也可以.
 
procedure ShellExecute(const CommandLine: string
ShowCmd: Integer = SW_Show);
begin
ShellAPI.ShellExecute(0, nil, PChar(CommandLine), nil, nil, ShowCmd);
end;

如果调用以上函数 ShellExecute('http://www.8421.org') 不能浏览那就是你的系统
没有默认的浏览器,不信你在开始、运行中打 http://www.8421.org 试试,能行的话
这个函数就能行,因为调用的是同一个东西
 
我明白了,我在别人的机子上试可以.原来是没有默认的浏览器.
 
顶部