1,183
社区成员
发帖
与我相关
我的任务
分享
uses
SHELLAPI;
procedure TForm8.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',PWideChar(Edit1.Text),'','',SW_SHOWNORMAL);
end;
[/quote]
错误
[Error] U_Main.pas(7164): Incompatible types: 'WideChar' and 'Char'
[Fatal Error] M001.dpr(18): Could not compile used unit 'U_Main.pas'[/quote]
那是数据类型不正确,你把WideChar改可Char就可以了。估计你用的是低版本的DELPHI。
uses
SHELLAPI;
procedure TForm8.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',PWideChar(Edit1.Text),'','',SW_SHOWNORMAL);
end;
[/quote]
错误
[Error] U_Main.pas(7164): Incompatible types: 'WideChar' and 'Char'
[Fatal Error] M001.dpr(18): Could not compile used unit 'U_Main.pas'
uses
SHELLAPI;
procedure TForm8.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',PWideChar(Edit1.Text),'','',SW_SHOWNORMAL);
end;
[/quote]
运行通不过呢[/quote]
怎么会呢,我是测试过的。你不通有没有什么错误提示啊。
uses
SHELLAPI;
procedure TForm8.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',PWideChar(Edit1.Text),'','',SW_SHOWNORMAL);
end;
[/quote]
运行通不过呢
uses
SHELLAPI;
procedure TForm8.Button1Click(Sender: TObject);
begin
ShellExecute(handle,'open',PWideChar(Edit1.Text),'','',SW_SHOWNORMAL);
end;