Simple C++ Web Browser
Posted: Sun Jun 27, 2010 1:04 am
Finally managed to finish a simple web browser with the Back, Forward, Navigate without any tutorials or references.
Here's the outcome screenshot: 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:
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.
Here's the outcome screenshot: 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
In the Forward button:
this->webBrowser1->GoBack();
Code: Select all
In the Navigate button:
this->webBrowser1->GoForward();
Code: Select all
In the webbrowser's DocumentCompleted (just double tap it in the designer):
this->webBrowser1->Navigate(textBox1->Text);
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.