Go Premium for a chance to win a PS4. Enter to Win

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

Connect to URL

Hello,
I need help, how would I be able to connect to a specified
URL from my program.What I needed was a way to have the
dial-up-networking dial the number then have netscape load
to the specified URL. If this is answered could someone include an explanation of how this is achieved.
Regards a Newbie using Delphi 3.0 standard edition..
0
frw
Asked:
frw
  • 2
1 Solution
 
viktornetCommented:
Simply use this.////

ShellExecute(0, 'open', 'http://www.yahoo.com', nil, nil, SW_NORMAL);

This would connect to YAHOO

Regards,
Viktor Ivanov
0
 
viktornetCommented:
Oh, by the way./// Don't foget to include ShellAPI in your uses clause...
also....here are the parameters of the function...

-0 is the Handle
-'open' is a function to OPEN a file....there is also 'print'
-'http://www.yahoo.com' is the address to open.... you can also use 'mailto:viktor@megsinet.net'   which would open the mail so you can send a mail to the person with an e-mail address   viktor@megsinet.net in this case this is my address :-) You can also open a file in Windows//   just replace the 'http://www.yahoo.com' with 'C:\windows\desktop\test.txt' or something and   there you go..
-The next two parameters you don't need so you leave 'em to be NIL or Pointer(0)which is   same
-The next parameter is SW_NORMAL which will show the window in a normal position and so   on... You can also us SW_HIDE and so on....See these commands in the Win32.hlp help file

Regards,
Viktor Ivanov
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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