• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

Windows application .net c# thread structure

Hi

Building a new application as a windows form using .net c#.

Most of my code has been .net c# website building so windows forms are a mystery, especially threads!

Application checks a table for new records being added every 5 minutes and if it finds a new record it does find a new records it runs a process and updates the form interface.

Would like the interface to be updated every 5 minutes to show application still working even if no new records.

Hope I have made that clear.

Before start I wonder if somebody could help with structure of code in the windows form

Rgds
stephen



0
stephenwilde
Asked:
stephenwilde
1 Solution
 
strickddCommented:
What you're looking for is the BackgroundWorker class (http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx).

The "backgroundWorker1_DoWork" method will check the database, call a method to update the form, and then sleep for 5 minutes.
0
 
stephenwildeAuthor Commented:
thank you -sorry for delay in replying to your speedy response
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now