Solved

Launch default browser?

Posted on 1998-11-04
6
814 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month5 days, 23 hours left to enroll

627 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