So just working this tutorial from Microsoft but sadly there are a few lines missing from the Form1.Designer.cs class where all the controls are defined to be members of the Form1 class.
Here is the missing code which you should place at bottom of Form1.Designer.cs
private void InitializeComponent()
{
// ... Designer authored code goes here do not modify...
}
#endregion
// Here the new code begins
private System.Windows.Forms.WebBrowser webBrowser1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem printToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem printPreviewToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pageSetupToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton goButton;
private System.Windows.Forms.ToolStripButton backButton;
private System.Windows.Forms.ToolStripButton forwardButton;
private System.Windows.Forms.ToolStripButton stopButton;
private System.Windows.Forms.ToolStripButton refreshButton;
private System.Windows.Forms.ToolStripButton homeButton;
private System.Windows.Forms.ToolStripButton searchButton;
private System.Windows.Forms.ToolStripButton printButton;
private System.Windows.Forms.ToolStrip toolStrip2;
private System.Windows.Forms.ToolStripTextBox toolStripTextBox1;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
// Here the new code ends
}
}
Early experiments show this browser control doesn't like JSON parsing as found in JQuery. I wonder how much Javascript is compromised. I also wonder if in fact one could write a pure HTML web page and handle events in C#.
No comments:
Post a Comment