Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have developed windows form and i want to update that form data without closing that form.means data should be automatically fetched from database.
currently data is updated on form load only.i have to close the form each time to get latest data from database.
it is possible to do this??

What I have tried:

currently data is refreshed on form load only. i want data to be refreshed without form load.
Posted
Updated 11-Mar-18 5:09am

1 solution

The easiest option is to use a System.Windows.Forms.Timer see example here:
Timer Class (System.Windows.Forms)[^]
You can define the Timer in code, or drag one from the Toolbox onto your form.
More information on Timers here: Timers[^]
 
Share this answer
 
Comments
Maciej Los 11-Mar-18 16:09pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900