| View previous topic :: View next topic |
| Author |
Message |
AndrewMan Grandmaster Cheater Supreme
Reputation: 0
Joined: 01 Aug 2007 Posts: 1257
|
Posted: Sat Jun 21, 2008 11:28 pm Post subject: .Net refreshing/closing a URL. |
|
|
I am working on an auto-refresher for URLs and have came up with some ways to do it:
1) Open the URL, close it, than open it up.
2) Find the code to refreshing it.
3) Open the program (firefox, ie, etc.) with the URL, terminate the program, start the program up again with the URL.
Heres the code to open a URL:
| Code: |
System.Diagnostics.Process.Start("http://www.google.com") |
So basically does anyone have the code for refreshing a URL/Closing one? I did try google.
And this is not in a webbrowser control, this in your default web browser.
_________________
|
|
| Back to top |
|
 |
Typhoon808 Expert Cheater
Reputation: 0
Joined: 27 Mar 2008 Posts: 175 Location: Wales
|
Posted: Sun Jun 22, 2008 4:50 am Post subject: |
|
|
You could use the WebBrowser control and add a timer to your form. Then for the timer tick code, use WebBrowser1.Refresh().
Change the timer interval to suit your speed.
|
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sun Jun 22, 2008 4:55 am Post subject: |
|
|
Do you mean refreshing a URL inside a WebBrowser? Or inside a WebBrowser control on a form? In that case, just use the above method:
| Code: | | WebBrowser1.Refresh(); |
Otherwise you could easily just send F5 to the WebBrowser, which almost always refreshes the page (in most web browsers)
|
|
| Back to top |
|
 |
AndrewMan Grandmaster Cheater Supreme
Reputation: 0
Joined: 01 Aug 2007 Posts: 1257
|
Posted: Sun Jun 22, 2008 9:29 am Post subject: |
|
|
Not in a WebBrowser control, in a browser like firefox/ie/opera/etc...
_________________
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sun Jun 22, 2008 10:15 am Post subject: |
|
|
| Send F5 to the window?
|
|
| Back to top |
|
 |
Typhoon808 Expert Cheater
Reputation: 0
Joined: 27 Mar 2008 Posts: 175 Location: Wales
|
Posted: Sun Jun 22, 2008 11:00 am Post subject: |
|
|
| Yeah, there's no point opening and closing the browser all the time when you can just refresh. Sending the F5 key is the best option.
|
|
| Back to top |
|
 |
AndrewMan Grandmaster Cheater Supreme
Reputation: 0
Joined: 01 Aug 2007 Posts: 1257
|
Posted: Sun Jun 22, 2008 11:52 am Post subject: |
|
|
| HolyBlah wrote: | | Send F5 to the window? |
That works . Thanks
_________________
|
|
| Back to top |
|
 |
|