Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Launch default browser?

Posted on 1998-11-04
6
Medium Priority
?
816 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:svenj
ID: 1345545
Adjusted points to 50
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1345546
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
ID: 1345547
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:BoRiS
ID: 1345548
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
ID: 1345549
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 150 total points
ID: 1345550
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

722 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