Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
for every one hour i need a pop up form in Winforms with out using Windows services. how?
Posted

One of the possible variants is to use timer with time delay equals 1 hour.
the you must to subscribe to timer tick events and perform WinWorm display workflow.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Jan-13 0:43am    
Didn't you think that this request is a huge abuse of UI and... everything?
—SA
Oleksandr Kulchytskyi 21-Jan-13 5:15am    
Why abuse ? If i will be using System.Threading.Timer ,which performs counting on separate thread, so no overheads on UI thread. Furthermore, if we try to inject Rx to aforementioned approach and change existing behavior to push, with this approach we can extremely reduce some overheads to UI part.

Maybe you can advise some more advanced approach, i would like to hear it, because you have a spot and always have been giving nice advices =)
Sergey Alexandrovich Kryukov 21-Jan-13 10:55am    
I don't mean it. I mean design, treating the user with intrusive behavior, etc. Do you think the user can tolerate such application behavior? I would not. The whole idea is to abuse the user, don't you think so?
—SA
Oleksandr Kulchytskyi 21-Jan-13 13:41pm    
Ouhh, yep , from that point of view, you are completely right!
You can use Timer Control and can define time interval for 1 hour.

Create popup message and show it on Timer Tick event.
 
Share this answer
 
Comments
sai sagar 28-Dec-12 3:52am    
is there any samples
uspatel 28-Dec-12 3:56am    
http://stackoverflow.com/questions/1142828/add-timer-to-a-windows-forms-application
sai sagar 28-Dec-12 4:02am    
ya its working. now i want in case of my application is closed then after one hr same pop will appear..
uspatel 28-Dec-12 4:08am    
Its only occurs when your application is running otherwise you need windows services.
there can be an alternative
if you don't want to show form to user. remove minimize maximize close button from form and form size 0,0 and run application.

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