Is there any alternative for doevent
-
Hi all, I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem:(. Thanks in Advance, Sushma
-
Hi all, I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem:(. Thanks in Advance, Sushma
-
To keep the GUI responsive while executing a long-running task you should execute that task in its own thread. This can be done manually, using the Thread class, using the ThreadPool (in .NET 1.x) or the BackgroundWorker (.NET 2.x)