Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Open a webpage in a webbrowser thats allready active

Title: Open a webpage in a webbrowser that's allready active. Question: Open a webpage in a webbrowser that's allready active. Answer: { This opens a webpage in a browser window that's allready active. I found the code somewhere on the borland site. } procedure GotoWebPage; var DDE : TDDECLientConv; URL : String; URLFired : Boolean; begin URL := 'http://www.hotbot.com'; DDE := TDDEClientConv.Create(nil); try DDE.ServiceApplication := 'iexplore'; if DDE.SetLink('iexplore', 'WWW_OpenURL') then if DDE.RequestData(URL + ',,1') nil then if DDE.SetLink('iexplore', 'WWW_Activate') then URLFired := DDE.RequestData('0,0') nil; finally DDE.Free; end; end;