Hello all,
Please excuse my ignorance, but I'm a newb.
I was creating my first windows form app as described in the help file. I'm
fairly certain that I entered everything as I was supposed to, but the
browser is not displaying anything but the standard IE error "The page cannot
be displayed". The app seems to be going forward & backward, but no web pages
are being displayed. I added full http paths to the list in the combo box. I
definitely added the initialization code to the form. Is there anything else
required to initialize the browser control? Code is attached below.
Thanks!!!
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
#endregion
namespace WindowsApplication1
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
comboBox1.SelectedIndex = 0;
webBrowser1.GoHome();
}
private void webBrowser1_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
}
private void button_go_Click(object sender, System.EventArgs e)
{
webBrowser1.Navigate(comboBox1.SelectedItem.ToStri ng());
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs
e)
{
}
private void homeToolStripMenuItem1_Click(object sender, EventArgs e)
{
// Go to Home Page menu option
webBrowser1.GoHome();
}
private void goForewardToolStripMenuItem_Click(object sender,
EventArgs e)
{
// Go forward menu option
webBrowser1.GoForward();
}
private void goBackwardToolStripMenuItem_Click(object sender,
EventArgs e)
{
// Go back manu option
webBrowser1.GoBack();
}
}
}