CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jun 2008
    Posts
    12

    Webbrowser giving me issues...

    So I am trying to have a window with Web Browser control in which I will be filling forms on various websites. This is my current code to load google, which works fine:

    Code:
    private void Form1_Load(object sender, EventArgs e){
                WebBrowser1.Navigate("www.google.com");
            }
    Then, here's my document completed code:

    Code:
            private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e){
    
                HtmlDocument doc = this.WebBrowser1.Document;
    
            }

    This is the error I am getting:

    Code:
    Error	1	Cannot implicitly convert type 'object' to 'System.Windows.Forms.HtmlDocument'. An explicit conversion exists (are you missing a cast?)	C:\Users\Admin\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.cs	27	32	WindowsFormsApplication1
    Can someone please explain to me what I am doing wrong?
    Last edited by Silo1337; July 11th, 2009 at 11:27 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured