Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
there is one infinite loop in button wpf because of it window will unresponsive how fix
Posted
Comments
Santosh K. Tripathi 22-Feb-15 23:18pm    
Could make it more clear. what is code?
By the way put some condition to break loop.
Member 8806421 22-Feb-15 23:28pm    
i want a continous loop for read values from com port so i can't break loop and i click on button for receive message so Ui of wpf unresponsive
Sergey Alexandrovich Kryukov 22-Feb-15 23:30pm    
Whole idea is totally wrong.
—SA
Sergey Alexandrovich Kryukov 22-Feb-15 23:30pm    
You can 'fix' something broken, not something which does not exist. The question makes no sense.
—SA

1 solution

To work with COM port, as well as other communications, and many other things, do it in a separate thread. Learn threading.
—SA
 
Share this answer
 
Comments
Santosh K. Tripathi 23-Feb-15 1:02am    
5+
Sergey Alexandrovich Kryukov 23-Feb-15 8:53am    
Thank you, Santosh.
—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