How to clear browsing history using WebBrowser control in C#

后端 未结 2 1783
天命终不由人
天命终不由人 2020-12-22 12:52

I want to clear the browsing history of a WebBrowser control in C# after the WebBrowser completes its browsing.

This is my code:



        
2条回答
  •  臣服心动
    2020-12-22 13:53

    Temporary Internet Files

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")
    

    Cookies()

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 2")
    

    History()

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 1")
    

    Form(Data)

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 16")
    

    Passwords

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 32")
    

    Delete(All)

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 255")
    

    Delete All – Also delete files and settings stored by add-ons

    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351")
    

提交回复
热议问题