|
-
Apr 15th, 2010, 03:08 PM
#1
Thread Starter
New Member
[RESOLVED] Delete Cache or Cookies in my Web browser
I have a web browser named Webbrowser1 and I wish to have it clear cookies when I click a button. Anyone know how?
-
Apr 15th, 2010, 09:43 PM
#2
Re: Delete Cache or Cookies in my Web browser
When you create a WebBrowser using the WebBrowser component, you're not actually creating a WebBrowser. You're just adding your own GUI to a strip downed version of IE.
That being said, the WebBrowser component inherits its cache, cookies, and other temporary file locations from IE's locations.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Apr 16th, 2010, 04:07 AM
#3
Lively Member
Re: Delete Cache or Cookies in my Web browser
Below is a full list of the codes I use for deleting cache, cookies, history, forms data etc. Just paste the one you want into your buttons click event.
Code:
'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")
Hope this helps.
-
Apr 16th, 2010, 10:52 AM
#4
Re: Delete Cache or Cookies in my Web browser
Launching an external executable to clear these settings provides unnecessary overhead.
These paths are built into the framework. Their located within the System.IO namespace, within [/b]Environment[/b], I believe.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Apr 17th, 2010, 03:15 AM
#5
Lively Member
Re: Delete Cache or Cookies in my Web browser
 Originally Posted by weirddemon
Launching an external executable to clear these settings provides unnecessary overhead.
These paths are built into the framework. Their located within the System.IO namespace, within [/b]Environment[/b], I believe.
These paths are indeed built into the Environment namespace. I did some research for deleting cookies etc when I was creating my own web browser application and all of the code I could find to do what I wanted involved multiple lines of code, some of which were quite large. Not sure how Internet Explorer does this, code wise, but the dialogues that appear when these processes are run appear exactly the same as the Internet Explorer ones.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|