Click here to Skip to main content
15,913,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello, i want pop ups in my gui application based upon a particular time say for example if the time is 2.00pm in the database then my pop up form must apperar to me.Plz help

Thank You,
Posted

Set up a timer in your application that fires every second, or minute. When the tick event occurs, check if it is the time time you are waiting for, and use Form.Show or Form.ShowDialog to display the pop up.
 
Share this answer
 
radix3 wrote:
timer1.Interval = dr[0].ToString();

How can Interval be String??

If I am getting you right, you have a time stored in database.
So what's the problem?
When the application starts, get the time from database, calculate the difference and find the interval. Set the Timer interval to that time.

If this is not what you are trying, please elaborate.

[Original Griff] I don't see a reason why your answer is down-voted. My 5 to compensate it. Cheers!
 
Share this answer
 
v2
Original Griff Sir i tried ur concept and its working but the thing is that i want to set the interval property of the timer based upon a particular time saved in the database so i tried to add a small database code and then

timer1.Interval = dr[0].ToString();

where dr is a variable of sqlDataReader class, but when i do this many instance of the same form are being opened at a same time please help me out sir

Thank you...
 
Share this answer
 

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