SpeakComputers.com
Home
Software
Electronics
Desktop Computers
Laptops
Games
Handheld Devices
Mobile Phones
Cameras
Camcorders
Printers
Books
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010
ASP.NET C# VB.NET C++ .NET Infragistics DevComponents

C++ WebBrowser Control.

The C++ Windows.Forms.WebBrowser control can be used within applications to allow the user to surf the internet and open web enabled documents like html help files, word documents etc.

The control is a basic webbrowser control and is by no means perfect. When using the control for surfing the internet, you will notice that it does not respond to Flash objects correctly. With the Flash objects, the control will only rspond once (click) on the Flash object.

The control includes several navigation methods or functions as: Url ,Navigate ,GoBack ,GoForward ,GoHome, GoSearch.

Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)

Creating an new C++ Windows forms WebBrowser.
WebBrowser^ webbrowser = gcnew WebBrowser;

Setting the DockStyle for the WebBrowser.
webbrowser->Dock = System::Windows::Forms::DockStyle::Fill;

Navigating Home with the WebBrowser Control.
webbrowser->GoHome();

Navigating to a specific web site.
webbrowser->Navigate("http://www.speakcomputers.com");

Adding a C++ WebBrowser control to the form.
this->Controls->Add(webbrowser);

Creating a DocumentCompleted Event for the C++ WebBrowser control.
webbrowser->DocumentCompleted += gcnew System::Windows::Forms::WebBrowserDocumentCompletedEventHandler(this, &Form1::webbrowser_DocumentCompleted);

Responding to the C++ DocumentCompleted event.
private: System::Void webbrowser_DocumentCompleted(System::Object^ sender, System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^ e)
{
this->BackButton->Enabled = webbrowser->CanGoBack;
this->ForwardButton->Enabled = webbrowser->CanGoForward;
this->textBox1->Text = webbrowser->Url->ToString();
}

C++ WebBrowser control Tutorial.

To display the Print Dialog Box.
this->webbrowser->ShowPrintDialog();

To display the Print Preview Dialog Box.
this->webbrowser->ShowPrintPreviewDialog();

To display the Properties Dialog Box.
this->webbrowser->ShowPropertiesDialog();

Computer Security
AntiVirus Software
Internet Security
Parental Controls
Backup & Recovery
Computer Protection
Anti Malware
Photo & Video
Photo & Video Editing
Video Music
Desktop Publishing
Professional Design
Home Publishing
Clipart
Business & Accounting
Accounting
Payroll
Check Printing
TAX
H&R Block
Microsoft Office
Design
Graphic Design
Home Design
Garden Design
Interior Design
Computer Aided Design
3D Design
Students & Teacher
Adobe
Microsoft Office
Dragon Naturally Speaking
Corel Draw
Serif
Student/Teacher Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Home About Privacy Policy Resouces