Solved

Launch default browser?

Posted on 1998-11-04
6
812 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
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
Technology Partners: 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 50 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LAN or WAN ? 11 105
Firemonkey DbLookupComboBox equivalent ? 2 66
Breakpoint doesn't stop in my variable 3 36
Using MMsystem To change audio input 1 14
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 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