uses shellapi;
shellexecute(handle,nil,'www.csdn.net',nil,nil,sw_shownormal);
这个办法可以开一个超链接那么如下
uses shellapi;
var sky:string;
begin
sky:='c:\';
shellexecute(handle,nil,sky,nil,nil,sw_shownormal);
end;怎么就一直报错??!@!
shellexecute(handle,nil,'www.csdn.net',nil,nil,sw_shownormal);
这个办法可以开一个超链接那么如下
uses shellapi;
var sky:string;
begin
sky:='c:\';
shellexecute(handle,nil,sky,nil,nil,sw_shownormal);
end;怎么就一直报错??!@!
shellexecute(handle,nil,PChar(sky),nil,nil,sw_shownormal);shellexecute的第三个参数是PChar类型的,而你的syk是String类型的,需要进行类型转换.
shellexecute(handle,nil,'c:\',nil,nil,sw_shownormal);
没有任何问题