show text in statusbar
-
i need to show text in my status bar to show a process working and what is happening. the problem is i have no idle time to update the status bar. how can i update the status bar without stopping my code?. (or can i?)
If you have no time to update your status bar, you have a more underlying problem with cpu usage. your app is going to be totally unresponsive. If someone obscures it with another window, and then hides that window, your app is not going to redraw. This creates a poor user experience and they'll think your app has crashed. Consider putting your intensive code in a worker thread, and leave the main thread free to pump messages, and update the UI. Signature space for rent. Apply by email to....
-
If you have no time to update your status bar, you have a more underlying problem with cpu usage. your app is going to be totally unresponsive. If someone obscures it with another window, and then hides that window, your app is not going to redraw. This creates a poor user experience and they'll think your app has crashed. Consider putting your intensive code in a worker thread, and leave the main thread free to pump messages, and update the UI. Signature space for rent. Apply by email to....
my program imports or scans images and preforms icr on the image and archives that image to a drive or cd. i can also do all this in less that 1 sec. my program does lots in little time. some scan session will scan over 5000 documents without crashes. all i need to know if a statusbar can be forced to update.
-
i need to show text in my status bar to show a process working and what is happening. the problem is i have no idle time to update the status bar. how can i update the status bar without stopping my code?. (or can i?)
-
my program imports or scans images and preforms icr on the image and archives that image to a drive or cd. i can also do all this in less that 1 sec. my program does lots in little time. some scan session will scan over 5000 documents without crashes. all i need to know if a statusbar can be forced to update.
In short, no, you can't update the status bar. To update the status bar, at the end of the day, involves sending a message to the status bar itself. There will be no cpu timeslice for that to happen if your one and only thread is blocked. That is the perfect case for a worker thread. If your user was doing a batch of 5,000 documents each taking 1s, he's going to be waiting a long time. you need to give him a cancel button- and you can't handle the click of the button if your main thread is busy doing scanning. someone else please back me up on this! or point me out if i'm wrong. Signature space for rent. Apply by email to....
-
In short, no, you can't update the status bar. To update the status bar, at the end of the day, involves sending a message to the status bar itself. There will be no cpu timeslice for that to happen if your one and only thread is blocked. That is the perfect case for a worker thread. If your user was doing a batch of 5,000 documents each taking 1s, he's going to be waiting a long time. you need to give him a cancel button- and you can't handle the click of the button if your main thread is busy doing scanning. someone else please back me up on this! or point me out if i'm wrong. Signature space for rent. Apply by email to....
actually i have 2 threads. one for scanning or importing and the other for icr and saving. as thread 1 scans the other processes the prev image (if still in the buffer). i have a window for the scanner that pops up and there is a cancel button. it all works great the scanner will usally have to process the log that is ready to scan before it stops but i do not have any idle time to have the status bar update when ever.
-
actually i have 2 threads. one for scanning or importing and the other for icr and saving. as thread 1 scans the other processes the prev image (if still in the buffer). i have a window for the scanner that pops up and there is a cancel button. it all works great the scanner will usally have to process the log that is ready to scan before it stops but i do not have any idle time to have the status bar update when ever.