I have two windows form applications.In the first application i have button called "Request".If i press the "Request" button, the data in the datagriview in the same application should go to the database and show a notification in the other application.I have succeed in that.All I need is to keep the second windows form application refreshing every 5 minutes.How to do that?
Asked
Active
Viewed 805 times
2
-
2windows form or asp.net - which one? They are not the same. – codingbiz Oct 20 '12 at 19:00
-
2Instead of using a timer component to check for new data, you may have a look at _this question_ [**listen for events in another application**](http://stackoverflow.com/questions/17878/listen-for-events-in-another-application) – Pilgerstorfer Franz Oct 20 '12 at 20:20
2 Answers
0
I am not clear what your problem is, but if i am getting right (you want to referesh a form in your second application, which notify you about data updates) then put a timer control somewhere on your form (the form you want to refersh) and after setting its duration to 5 seconds, you can write your refresh logic inside the tick event of the form.

Abdul Majid
- 95
- 1
- 10
-
-
Drop a Timer control from toolbox on your second from. set its interval property to 5000(milisecond) and enabled to true, double click the timer control, an event will be generated for tick, write down your logic in that event,
private void timer1_Tick(object sender, EventArgs e) { //write your update logic //select your data from DB and bind... }
– Abdul Majid Oct 21 '12 at 06:46
0
You can do these works to set an autorefresh for every 5min but I didn't understand your question!
- Add a timer
- Change the interval to 300000
- Double click on Form and write:
timer1.Start(); //Replace your timer name instead of "timer1"
Double click on Timer and write:
this.Refresh();

Pouya
- 109
- 1
- 8