代码
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(Handle,'open','http://www.google.com',nil,nil,SW_SHOW);
end;报错
[Error] Unit1.pas(62): Statement expected, but expression of type 'Cardinal' found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
请教了
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(Handle,'open','http://www.google.com',nil,nil,SW_SHOW);
end;报错
[Error] Unit1.pas(62): Statement expected, but expression of type 'Cardinal' found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
请教了
它已经告诉你有个 Statement 类型的参数,你赋了'Cardinal' 的值
不知道我的解释对不对.
http://kmok.cn/
如果没有加入ShellAPI单元的话会提示Undeclared identifier 'ShellExecute'
所以,很有可能是别的地方出错了,或者是本行的上一行出错。
仔细检查一下代码