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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Hyper Text Link

How can I run the defualt internet browser and load a URL - so I can make a Hyperlink component.  I looked in the registry quikely but did not find an entry or anything.

P.S I don't want sombody elses component - I want to make my own.
0
bogieman_
Asked:
bogieman_
1 Solution
 
ckanetaCommented:
add ShellAPI in uses clause

then

ShellExecute(0, Nil, PChar('www.whatever.com'), Nil, Nil, SW_NORMAL);
0
 
AttarSoftwareCommented:
Ckaneta is right, but

ShellExecute(0, Nil, PChar('http://www.whatever.com'), Nil, Nil, SW_NORMAL);

is better...

Tim.

(ckaneta, shouldn't that have been an answer, instead of a comment?)
0
 
ckanetaCommented:
probably, but one can always take a comment as an answer, this still lets anyone else make suggestions
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!

 
kotikCommented:
Hi!
Btw, you can use ShellExecute not only for a HyperLink, but also for AnyLink you want.
F.e.:

ShellExecute(0, Nil, 'mailto:some@body.com', Nil, Nil, SW_NORMAL);

or even like this:

ShellExecute(0, 'open', 'c:\app.exe', Nil, Nil, SW_NORMAL);

You don't need to convert arguments to PChar.
And don't forget to add ShellAPI to your uses clause.

Regards,
Kot.
0
 
MoonCalfCommented:
There's always the THyperLink component on JayMol's page....

   http://SecretDelphi.cjb.net

0
 
bogieman_Author Commented:
Cheers - just what I wanted - also thanks to whoever said about "mailto:...", I was just about to ask about that
0
 
bogieman_Author Commented:
Also , MoonCalf - I said in the frickin question that I didn't want any components!
0

Featured Post

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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now