Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:


Hi All

I have a windows Application which is run over WAN network on Individual PC
Using vb.net ,wcf and Sql Server 2008 R2 .

I want to give a alert message on every pc which is currently running Application
'like (Application is not Allowed after 12 pm )'

so is there any mechanism to display popup Message .

Please Help

Thanks
Posted
Updated 30-Dec-14 19:26pm
v2
Comments
Tushar sangani 31-Dec-14 1:45am    
set message Box for that
Sergey Alexandrovich Kryukov 31-Dec-14 2:29am    
Not allowed after 10 PM?! Cool feature... I guess, bytes also need some rest. :-)
—SA
Richard MacCutchan 31-Dec-14 4:34am    
Just add some code to check the time, or add a timer, and show the message when appropriate.
Naim_86 31-Dec-14 4:44am    
But when I put a timer , Application get slow bcoz every time inverval it communicate with server to check new message update
Richard MacCutchan 31-Dec-14 4:50am    
Then do something different. Please don't expect people here to guess what your application is doing.

1 solution

There are ways to do this, but basically there are only two that you should look at:
1) Use an application on a central server that the individual PC apps communicate with - a Socket will probably do it. If the connection is lost, the PC app shuts down. Otherwise the server has to note the local time for the PC and tell it to display the message at the appropriate point. Nasty, clumsy, and prone to annoying users...
2) Use a timer in the PC app to check the local time (or time via a server) as you have described. If this method is slowing things down, then either your timer is set to much too high a frequency, or you need to move the "check the time" code into a BackgroundWorker task to prevent it "freezing" the UI while the check is being performed.

I'd go with the timer - that way if the server connection is lost, the user can continue to use the app until the local time expires.
 
Share this answer
 
Comments
Naim_86 2-Jan-15 5:01am    
Thanks its help me
OriginalGriff 2-Jan-15 6:29am    
You're welcome!

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