convert c# to vb.net webbrowser -


am trying convert c# vb.net has webbrowser control, confused. code in usercontrol.

c#

 private void setupevents()     {         webbrowser1.navigated += new webbrowsernavigatedeventhandler(webbrowser1_navigated);         webbrowser1.gotfocus += new eventhandler(webbrowser1_gotfocus);     }   [browsable(true)]     public override color backcolor     {                 {             return base.backcolor;         }         set         {             base.backcolor = value;             if (readystate == readystate.complete)             {                 setbackgroundcolor(value);             }         }     }    public htmldocument document         {             { return webbrowser1.document; }         } 

the error 'public event navigated(sender object, e system.windows.forms.webbrowsernavigatedeventargs)' event, , cannot called directly. use 'raiseevent' statement raise event.

please help

try code:

private sub setupevents()     addhandler webbrowser1.navigated, addressof me.webbrowser1_navigated     addhandler webbrowser1.gotfocus, addressof me.webbrowser1_gotfocus end sub     <browsable(true)>  _ public overrides property backcolor color             return mybase.backcolor     end     set         mybase.backcolor = value         if (readystate = readystate.complete)             setbackgroundcolor(value)         end if     end set end property  public readonly property document htmldocument             return webbrowser1.document     end end property  private sub setupevents()     addhandler webbrowser1.navigated, addressof me.webbrowser1_navigated     addhandler webbrowser1.gotfocus, addressof me.webbrowser1_gotfocus end sub 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -