Page 1 of 1

Simple C++ Web Browser

Posted: Sun Jun 27, 2010 1:04 am
by Nery
Finally managed to finish a simple web browser with the Back, Forward, Navigate without any tutorials or references.

Here's the outcome screenshot:
screenie!.PNG
As shown in the screenshot above you'll need 3 buttons.
Change the names as bellow:
Button1 -> Back
Button2 -> Forward
Button3 -> Navigate

1 Textbox, call it txtURL
and 1 Webbrowser, leave its name as webBrowser1.

In the Back button place this code:
Code: Select all
this->webBrowser1->GoBack();
In the Forward button:
Code: Select all
this->webBrowser1->GoForward();
In the Navigate button:
Code: Select all
this->webBrowser1->Navigate(textBox1->Text);
In the webbrowser's DocumentCompleted (just double tap it in the designer):
Code: Select all
this->Text = webBrowser1->DocumentTitle;

NOTES:
"this->" stands for "Me." in vb.net
The whole code in Visual C++ is CaSe SeNsItIvE
Be sure you always add a ";" in the end of each code line
C++ is a total pain so be sure you are mentally ready if you want to get in touch with monster.

Re: Simple C++ Web Browser

Posted: Mon Jul 26, 2010 2:44 am
by zachman61
thanks

Re: Simple C++ Web Browser

Posted: Sat Jul 31, 2010 12:22 pm
by MrAksel
Hehe, thanks for the tutorial I really needed it. I am trying to learn C++, but it is really confusing. Please post more tutorials! That would be great!

Re: Simple C++ Web Browser

Posted: Sat Aug 07, 2010 2:21 am
by zachman61
C++ doesn't seem to different from vb so far but it is i know

Re: Simple C++ Web Browser

Posted: Tue Nov 23, 2010 2:26 am
by Alex
This is totally different from what I do. o_o
(C++ Win32) I actually have to write the code to create the window!

Nice tutorial by the way.