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


I want Delphi 2007 to tell my default webbrowser to open a URL

Posted on 2008-06-26
Medium Priority
Last Modified: 2011-10-03
Any tips?
Question by:Paer Toernell
  • 4
LVL 38

Accepted Solution

Geert Gruwez earned 1000 total points
ID: 21873549
procedure TForm1.ButtonClick(Sender: TObject);
  ShellExecute(0, 'OPEN', 'http://www.experts-exchange.com', nil, nil, SW_SHOWNORMAL);

and from the command prompt:
start http://www.experts-exchange.com
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21873555
oh yeah  don't forget to add

uses ShellApi;

Author Comment

by:Paer Toernell
ID: 21874261
i dont understand:

{and from the command prompt:
start http://www.experts-exchange.com}

i have to add some dos commands?

LVL 38

Expert Comment

by:Geert Gruwez
ID: 21874562
no you can test it like that too to see if it works

hit start / run
start http://www.experts-exchange.com

opens the command window

start http://www.experts-exchange.com
should open your default browser in devexpress

you could experiment by changing the default browser ...

LVL 38

Expert Comment

by:Geert Gruwez
ID: 21874568
there are 2 solutions in there :)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

581 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