A
atomy
Unregistered / Unconfirmed
GUEST, unregistred user!
执行到下面的shellExecute 老出错误提示
[Error] Unit1.pas(23): Undeclared identifier: 'SW_SHOWNORMAL'
但是假如注释掉shellexecute这一句,使用showmessage('pass'); 是没有任何问题的。
请问我是不是那步做错了?
代码如下
unit Unit1;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, IEContextMenu1_TLB, StdVcl,Dialogs;
type
TIEMenu1 = class(TAutoObject, IIEMenu1)
protected
procedure getURL(const URL: WideString)
safecall;
{ Protected declarations }
end;
implementation
uses ComServ,shellapi;
procedure TIEMenu1.getURL(const URL: WideString);
begin
ShellExecute(0, 'open', 'D:/html/delphi/网络--程序/IE右键1/project1.exe',pchar(URL), nil, SW_SHOWNORMAL);
//executefiles('D:/html/delphi/网络--程序/IE右键1/project1.exe',url,nil);
//winexec('D:/html/delphi/网络--程序/IE右键1/project1.exe');
end;
initialization
TAutoObjectFactory.Create(ComServer, TIEMenu1, Class_IEMenu1,
ciMultiInstance, tmApartment);
end.
[Error] Unit1.pas(23): Undeclared identifier: 'SW_SHOWNORMAL'
但是假如注释掉shellexecute这一句,使用showmessage('pass'); 是没有任何问题的。
请问我是不是那步做错了?
代码如下
unit Unit1;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, IEContextMenu1_TLB, StdVcl,Dialogs;
type
TIEMenu1 = class(TAutoObject, IIEMenu1)
protected
procedure getURL(const URL: WideString)
safecall;
{ Protected declarations }
end;
implementation
uses ComServ,shellapi;
procedure TIEMenu1.getURL(const URL: WideString);
begin
ShellExecute(0, 'open', 'D:/html/delphi/网络--程序/IE右键1/project1.exe',pchar(URL), nil, SW_SHOWNORMAL);
//executefiles('D:/html/delphi/网络--程序/IE右键1/project1.exe',url,nil);
//winexec('D:/html/delphi/网络--程序/IE右键1/project1.exe');
end;
initialization
TAutoObjectFactory.Create(ComServer, TIEMenu1, Class_IEMenu1,
ciMultiInstance, tmApartment);
end.