Click here to Skip to main content
14,880,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I am developing a chat application using c# 3.5 and SQL Server 2008. I am using a timer control to get new message, new user request etc. the timer interval is 1000ms. Now my problem is that Ul doe not give Response properly.


Please help me to make the UI more responsive.
Posted
Updated 5-May-11 23:13pm
v2
Comments
Keith Barrow 6-May-11 5:15am
   
Please do not use textspeak in your questions, it makes them unecessarily hard to read.
What do you mean the UI does not give the response properly, is it failing to show someting, is it partial data or is it just slow. Can you also post some code (use code tags!) so we can see what is likely to be wrong.
amitthakkar1987 6-May-11 5:20am
   
can u give me suggestion which type of threading i use ? means synchronous ya asynchronous ?
amitthakkar1987 6-May-11 5:21am
   
which technique is suitable for developing chat application ? can i use web servise?

1 solution

It sounds like you're running everything in the main thread. I'd recommend using either System.Threading or BackgroundWorker to run the Timer:

http://msdn.microsoft.com/en-us/library/system.threading.aspx[^]

http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[^]
   
Comments
   
This is correct; if OP does not do threads it's hard to achieve anything good; there is a lot more to it though. My 5.
--SA

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