Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1215
  • Last Modified:

Open browser and visit url ?

How to open default browser and visit some url from delphi ? Can you give me some examples.

Thank you ?
0
65zgtre45rr
Asked:
65zgtre45rr
  • 2
1 Solution
 
Stuart_JohnsonCommented:
The easiest way is to use the ShellExecute function (which is in the ShellAPI unit).

uses
  ShellAPI;

procedure TFOrm1.OpenURL(URL: String);
begin
  ShellExecute(0, 'OPEN', pChar(URL), '', '', SW_SHOW);
end;

Hope that helps,

Stuart.
0
 
65zgtre45rrAuthor Commented:
Yes, thank you :)
0
 
Stuart_JohnsonCommented:
No worries.  Glad to help.

Cheers!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now