Naveed Qamar
Naveed Qamar

Reputation: 127

Run code after form load periodically

I am developing a desktop window application. After form load, get some data from running machine and saved it to the ftp server in csv file and it shows that test completed. I want to run the same code which takes values and store on the sever after every one hour. How can i do it?

Console application and window service is not feasible solution because I have to show the form to the user etc.

Upvotes: 0

Views: 503

Answers (1)

Oded
Oded

Reputation: 498982

Use one of the timer classes that come with the BCL.

See Comparing the Timer Classes in the .NET Framework Class Library on MSDN.

Essentially you setup a timer with an interval (how often to fire, in your case every hour) and with a method to execute when it fires.

Upvotes: 2

Related Questions