×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to program web access

How to program web access

How to program web access

(OP)
I have a very simple question.

How to program an application to access the web.

What I want to do is be able to press a button and have the application call my web browser to access a particular web page.

I am using Borland C++ Builder version 5 (Build 12.34 )

Thanks

RE: How to program web access

Could you embed a browser in your application to show the web page?

RE: How to program web access

(OP)
I don't know how to do that.

 

RE: How to program web access

(OP)
Of course, I could make a system call... like

system( "C:\Program Files\Firefox\Firefox.exe -url URL" );

But, would want something more slick and not so absolute location dependent.

Claude

RE: How to program web access

In Windows the default web browser will be configured to automatically handle calls to access web pages. In your program, all you have to do is call the ShellExecute() API:

CODE

ShellExecute(NULL, "open", "http://www.tek-tips.com", "", NULL, SW_RESTORE);

Jeff
_______________________________________
SourceSafe Help | ClearQuest Help | PC Hardware

RE: How to program web access

ClaudeWSmith,

Does Builder version 5 have a TCPPWebBrowser component or a (???) (the name of the other web browser component is escaping me).  I haven't used version 5 in years, so I can't remember what was available.  If it does, you can drop a TCppWebBrowser component on your form and directly feed it web site addresses in code.

Steve.

RE: How to program web access

(OP)
Jeff;  Thanks - That works-

Where to get a list of all the API commands is my next quest.

Claude

RE: How to program web access

(OP)
Interesting:  The ShellExecute command works in Ver 5 but I don't have any documentation as to parameters, etc.

Claude
 

RE: How to program web access

Quote:

The ShellExecute command works in Ver 5 but I don't have any documentation as to parameters, etc.

Look at the FAQ in this forum.
 

James P. Cottingham
I'm number 1,229!
I'm number 1,229!

RE: How to program web access

You can use ActionList where the most of the ShellExecute commands are gathered. In version 5 there is no TAction for the browser. But in BCB2006 you have TBrowserURL, TDownloadURL and TSendMail under the standard Actions/Internet. It is as if you use the ShellExecute() command.

On my BCB5, there is a lot about Win API, under MS SDK Help files. It is for me the main reason why BCB5 is still installed on one of my computers. But you can find the same and now more actual on the Microsoft Website, which is now available for everyone since a couple of years.

RE: How to program web access

Hi

If it is available then use the NMHTTP component on the FastNet tab.

NMHTTP1->Get ( "address of web page ");
AnsString Response = NMHTTP1->Body;

Response contains the html of the web page.

useful if you are wanting to process the page as oppose to just display it.

Hope this helps!

Regards

BuilderSpec

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close