Hi to all
Is there any way to refresh (after certain time period) windows application automatically in .NET as in
web application?
If so, Please tell me the way.
Thanks in advance..
With Regards
ila
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaish MathewsPosted May 12, 2010, 6:11 AM
Try below things.
1. Paste a Timer control and make it Enabled = "True" and set it's Intervel property. It's in milliseconds
2. Define the logics for download in a method like below
public void DownLoadFiles()
{
//Download logic
}
3. Write below code inside Tick event of Timer. It's calling your method in a separate Thread. The calls will be in an intevel you already set as property of your Timer control
private void timer1_Tick(object sender, EventArgs e)
{
Thread th = new Thread(new ThreadStart(DownLoadFiles));
th.Start();
}
ilaPosted May 12, 2010, 5:48 AM
That's partially right.. Application should automatically be refreshed for every one hour so that it can search for new files to download..
thank you
with regards
ila
Jaish MathewsPosted May 12, 2010, 5:14 AM
ilaPosted May 12, 2010, 4:29 AM
I am doing project for file downloading.. My Requirement is if i once start the download process it should automatically download files..
For example let me start the process at 9 pm.. If some files are uploaded at 10 pm means i should not start the download process again..
Is there any way for it?
Thanks in advance..
With regards,
ila
Amit ChoudharyPosted May 8, 2010, 11:51 PM
please give your requirement what is the need of refreshing the window form?? cause then different way you have to choose..
Dipa AhujaPosted May 8, 2010, 8:16 AM
in timer control's event:
CrishPosted May 8, 2010, 8:07 AM
using javascript its possible to refresh webapplication.
thanks