Solved

Launch default browser?

Posted on 1998-11-04
6
807 Views
Last Modified: 2010-05-18
How do I launch the default browser within a delphi application, using a url adress? I am currently using Delphi 3 C/S.
0
Comment
Question by:svenj
  • 3
  • 2
6 Comments
 

Author Comment

by:svenj
Comment Utility
Adjusted points to 50
0
 
LVL 4

Expert Comment

by:BoRiS
Comment Utility
svenj

the best way to do it is use the SHellAPI call Shellexecute...

Add ShellAPI to your uses clause...

uses
Windows, Forms, ..., ShellAPI;

ShellExecute(handle, 'open', 'http://www.delphi32.com', '' , '', SW_SHOWNORMAL);

LAter
BoRiS
0
 

Author Comment

by:svenj
Comment Utility
That didn't work for me. Nothing happens. If I replace 'http:\\www.delphi32.com' with 'c:\index.html' then the program launches the browser with the page index.html. Why is that?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 4

Expert Comment

by:BoRiS
Comment Utility
svenj

did you have a browser window open when you used shellexecute, because what happens
is that it will load it in the open browser window...this works as I have used it several times myself...

to test close all your browsers windows just leave delphi open and then run the shellexecute command

Later
BoRiS
0
 

Author Comment

by:svenj
Comment Utility
BoRiS

It won´t work for me. As far as I know I've done everything right. Any way, I changed my mind and will use the 'c:\index.html' instead.
Many thanks

svenj

0
 
LVL 3

Accepted Solution

by:
bryan7 earned 50 total points
Comment Utility
try this component

"TGoToWeb
                    v2.1"

at   http://www.torry.ru/

in the section "Lan & Communications", ---> "Internet#2"

there's a component that lets you start the default browser, and jump to
the desired URL.

bryan

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now