«« Site Rescued »»

While the site is still going to move from its current host, a new site will now take its place. More Info.

The new site may have less content, but the core will now remain. And it will now play nicely with phones! Keep an eye on the DelphiDabbler Blog for news.

» Help

How to tell Netscape Navigator which web pages to load from your Delphi program

   

Wouldn't it be cool to have a hot key in your program that can activate and load a particular page (your home page on the web for example) into Netscape Navigator? Here's how:

program Netscape;

uses
  DDEMan;

procedure GotoURL(sURL: string);
var
  dde: TDDEClientConv;
begin
  dde := TDDEClientConv.Create(nil);

  with dde do
  begin
    { specify the location of netscape.exe }
    ServiceApplication := 'c:\ns32\program\netscape.exe';

    { activate the Netscape Navigator }
    SetLink('Netscape', 'WWW_Activate');
    RequestData('0xFFFFFFFF');

    { go to the specified URL }
    SetLink('Netscape', 'WWW_OpenURL');
    RequestData(sURL + ',,0xFFFFFFFF,0x3,,,');

    { ... }

    CloseLink;
  end;

  dde.Free;
end;

begin
  GotoURL('http://www.chami.com/tips/');
end.
Author: Unknown
Added: 2007-06-02
Last updated: 2007-06-02

« Return to contents »