Execute the default web browser  

Send By: Q3 Team
Web : www.q3.nu
Email: dlib@q3.nu
Date: 29/08/20

Tip accessed 496 times

 


Add 'ShellApi' in the uses of your form, adn execute this:




 	  ShellExecute(Form1.Handle,nil,PChar('index.html'),'','',SW_SHOWNORMAL);




But, with this way, the second time that we execute it, instead of opening up another window with
another web explorer, it will load us the second page that we have requested him in the same window.
To execute several instances of the web explorer we can use this other way:

Add 'UrlMon' in the uses of the form and execute this:


 HlinkNavigateString(Nil,'index.html');




If we want use a var for especify the address:

 Var
   Dire : String;
 Begin
   Dire := 'http://www.google.com';
   HLinkNavigateString(NIL, PWideChar(WideString(Dire)) );
 End;




Updated at 29/08/2005 PWideChar...