Board index » delphi » delphi and web browser

delphi and web browser

Please could you help me. I ve got a short program written in delphi 2.0.
From this program I d like to launch, either the current browser or a
browser determined by the user, with a special URL such as www.ec-lille.fr
for example.

How could I do that.
Thanks in advance.

Please answer directly by email

--
_____________________________________________________________________
Eric CASSOU - Departement R & D - Sligos-Axime
Rue de la Pointe; ZI A; 59113 Seclin France.
Fax : 03 20 60 76 76. e-mail : ecas...@axime.com

 

Re:delphi and web browser


Quote
Eric CASSOU RIBEHART wrote:

> Please could you help me. I ve got a short program written in delphi 2.0.
> From this program I d like to launch, either the current browser or a
> browser determined by the user, with a special URL such as www.ec-lille.fr
> for example.

> How could I do that.
> Thanks in advance.

> Please answer directly by email

> --
> _____________________________________________________________________
> Eric CASSOU - Departement R & D - Sligos-Axime
> Rue de la Pointe; ZI A; 59113 Seclin France.
> Fax : 03 20 60 76 76. e-mail : ecas...@axime.com

This code finds NN and starts it with a specified URL in the
simplest possible way:

procedure TMainForm.Button3Click(Sender: TObject);
var
  FileName, URL   : string;
  Reg        : TRegistry;
begin
  { Retrieve netscape information }
  Reg := TRegistry.Create;
  Reg.OpenKey('\software\netscape\netscape navigator\main', false);
  Filename := Reg.ReadString('Install
directory')+'\program\netscape.exe';

  Reg.Free;
  URL := 'http://www.cnn.com/';
  WinExec(PChar(FileName+' '+URL), SW_SHOWNORMAL);
end;

/// John

Re:delphi and web browser


Someone else replied with a large pile of code- you could load the default
browser doing this instead:

ShellExecute( 0, nil, 'http://www.ec-lille.fr', nil, nil, SW_NORMAL );

Make sure you put ShellAPI in the uses.

--
-
jfra...@cripton.com
http://www.cripton.com
 Eric CASSOU RIBEHART wrote in article <01bc5ece$b09f38f0$2c085ca0@rnd-pc25>
...

Quote
>Please could you help me. I ve got a short program written in delphi 2.0.
>From this program I d like to launch, either the current browser or a
>browser determined by the user, with a special URL such as www.ec-lille.fr
>for example.

>How could I do that.
>Thanks in advance.

>Please answer directly by email

>--
>_____________________________________________________________________
>Eric CASSOU - Departement R & D - Sligos-Axime
>Rue de la Pointe; ZI A; 59113 Seclin France.
>Fax : 03 20 60 76 76. e-mail : ecas...@axime.com

Other Threads