代码
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'
请教了

解决方案 »

  1.   

    仔细研究下报错 Statement expected, but expression of type 'Cardinal' found
    它已经告诉你有个 Statement 类型的参数,你赋了'Cardinal' 的值
    不知道我的解释对不对.
      

  2.   

    没有装Delphi不能看这个api的参数,大致应该ShellExecute的格式你写错了,另外//会不会变成注解?
      

  3.   

    你加入了 uses shellapi  了吗?另外,你的代码我已经在D7下测试通过了,没有任何问题的!-------------------------------------------
    http://kmok.cn/
      

  4.   

    你的代码是没有错的
    如果没有加入ShellAPI单元的话会提示Undeclared identifier 'ShellExecute'
    所以,很有可能是别的地方出错了,或者是本行的上一行出错。
    仔细检查一下代码