谈Delphi下Internet的编程技巧(一)[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 lyboy99 的 blog

  reg:=tregistry.create;

  reg.rootkey:=hkey_classes_root;

  if reg.keyexists('http\shell\open\command') then

  begin

    reg.openkey('http\shell\open\command',false);

    result:=reg.readstring('');

  end

  else

    result:='';

  reg.free;

end;

 

 

 

 

2.设置internet浏览器

 

procedure setdefaultshellhttp(cmdline : string);

var

reg : tregistry;

 

begin

  reg:=tregistry.create;

  reg.rootkey:=hkey_classes_root; //注册表的地址:

  reg.openkey('http\shell\open\command',true);//注册表的地址:

  reg.writestring('',cmdline);

  reg.free;

end;

setdefaultshellhttp('"c:\progra~1\intern~1\iexplorer.exe" -nohome');

 

 

本文关键:internet,delphi
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top