Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Visual Studio 2005 Windows application

Posted on 2008-10-01
1
Medium Priority
?
345 Views
Last Modified: 2012-05-05
I wrote the windows application that accesses the database, runs stored procedure and displays the dataset via DataGridView.  The user asks the data is to be refreshed every 15 minutes.  
I need help to code this.  The way the application works now is it starts and displays the form with a datagridview.
0
Comment
Question by:Aquarus
1 Comment
 
LVL 7

Accepted Solution

by:
joesthebighmoe earned 2000 total points
ID: 22617499
Add timer control to form (in ToolBox/Components) on the left in the IDE.

Set the timer control's enabled property to true.
Set the timer control's interval property to 900,000 (1000 ticks is a second, so 900K is 15 minutes)
Double click the timer control which will take you to the event that fires every time the timer "ticks".
In this event handler, call the code that refreshes the DataGridView
 private void timer1_Tick(object sender, EventArgs e)
    {
      RefreshMyDataGridView();
    }

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question