Answered How to reset webbrowser

  • Wednesday, May 04, 2011 3:04 AM
     
     
    I have a program that uses a webbrowser how do I get it to clear previous info. It stores everything. If it navigates to a page, it stores previous info, if I use refresh  option still don't clear. Now if I completely close the application then reopen it clears info. Is there away to do it without having to close out of the program? Would I have to use the dispose code every time, if so then how do I reactivate it?

Answers

  • Thursday, May 05, 2011 6:30 AM
     
     Answered

    The webbrowser control is simply a reuse of the by you used Internet Explorer version and acts completely like that. 

    To instance a complete new webbrowser is

    YourWebbrowser = new WebBrowser

    Don't think installing a new webbrowser, does that not cost time, no it don't instancing is just setting a new object and give the Garbage collector the time as the processing is low to release the old object. That is where OOP is build around.  

     


    Success
    Cor

All Replies

  • Wednesday, May 04, 2011 8:39 PM
     
      Has Code

    Hi,

    try

    WebBrowser1.Navigate("about:blank")
    


    Liebe Grüße Stefan | Cheers Stefan I'm using VB 2008 Express Be a good forum member - mark posts that contain the answers to your questions or those that are helpful c# in vb Translator: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • Wednesday, May 04, 2011 11:43 PM
     
     
    Nope didn't work it still stored the info.
  • Thursday, May 05, 2011 6:30 AM
     
     Answered

    The webbrowser control is simply a reuse of the by you used Internet Explorer version and acts completely like that. 

    To instance a complete new webbrowser is

    YourWebbrowser = new WebBrowser

    Don't think installing a new webbrowser, does that not cost time, no it don't instancing is just setting a new object and give the Garbage collector the time as the processing is low to release the old object. That is where OOP is build around.  

     


    Success
    Cor