I want to add some while() loop to a windows form app, the problem is that when I try its freezing the window because of the loop.
There is any way or method to add a loop that won't freeze the window?
I want to add some while() loop to a windows form app, the problem is that when I try its freezing the window because of the loop.
There is any way or method to add a loop that won't freeze the window?
The best method (though I don't have any advice on it) is using a background worker: http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
Maybe you should add a thread.
Yep, background worker did the job!
I found a nice tutorial, for some reason you need to replace the "." with "->" but it really great tutorial:
http://www.c-sharpcorner.com/UploadFile/Ashush/BackgroundWorker03082008094954AM/BackgroundWorker.aspx
(after all it isn't possible to learn C++ from MSDN which isn't understandable in most of the cases)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.