|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Maintaining a response user interfaceWhat is the right way to go about making sure an application is not frozen
and unresponsive while a relatively long running process is going on? The process is making updates to the UI, which the user needs to see as they are being made. However, it is desirable that the user is not able to actually interact with the application as far as clicking buttons, etc, goes. Application.DoEvents seems to update the UI nicely, but the user can still interact with the form, which is not good. Is DoEvents the right way to go here, and must all form elements that should not be interactive be disabled for the duration of the process? Any thoughts on this?
Show quote
Hide quote
"Marina" <someone@nospam.com> schrieb I think, no matter if you are using doevents or a different thread executing> What is the right way to go about making sure an application is not > frozen and unresponsive while a relatively long running process is > going on? The process is making updates to the UI, which the user > needs to see as they are being made. However, it is desirable that > the user is not able to actually interact with the application as > far as clicking buttons, etc, goes. > > Application.DoEvents seems to update the UI nicely, but the user can > still interact with the form, which is not good. Is DoEvents the > right way to go here, and must all form elements that should not be > interactive be disabled for the duration of the process? > > Any thoughts on this? the process, in both cases, you will have to disable the buttons if you want the user to be able to watch the process' output. This means, my suggestion is to modify the UI in a way that only valid actions are possible during the process. Watch out for the Form being closed, too. Suggesting a modal Form to disable the usage of the Form is no good because then the user wouldn't see the UI updates - unless the modal Form is used to display the output of the process. Armin
Show quote
Hide quote
"Marina" <someone@nospam.com> wrote in message If it were me, I'd disable all controls, show an hourglass mouse pointer, news:%23kj%23McdHGHA.1132@TK2MSFTNGP10.phx.gbl... > What is the right way to go about making sure an application is not frozen > and unresponsive while a relatively long running process is going on? The > process is making updates to the UI, which the user needs to see as they > are being made. However, it is desirable that the user is not able to > actually interact with the application as far as clicking buttons, etc, > goes. > > Application.DoEvents seems to update the UI nicely, but the user can still > interact with the form, which is not good. Is DoEvents the right way to > go here, and must all form elements that should not be interactive be > disabled for the duration of the process? > > Any thoughts on this? run the "relatively long running process", reset the mouse pointer and enable the controls. If that "relatively long running process" is longer than a few seconds, I'd probably show some animation (or a progressbar if the "% complete" information is available) while it's running. -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. Marina,
In my idea does just showing the control the job by painting it. Textbox1.show Cor Thanks everyone, I had a feeling disabling all the controls was the way to
go. Show quoteHide quote "Marina" <someone@nospam.com> wrote in message news:%23kj%23McdHGHA.1132@TK2MSFTNGP10.phx.gbl... > What is the right way to go about making sure an application is not frozen > and unresponsive while a relatively long running process is going on? The > process is making updates to the UI, which the user needs to see as they > are being made. However, it is desirable that the user is not able to > actually interact with the application as far as clicking buttons, etc, > goes. > > Application.DoEvents seems to update the UI nicely, but the user can still > interact with the form, which is not good. Is DoEvents the right way to > go here, and must all form elements that should not be interactive be > disabled for the duration of the process? > > Any thoughts on this? > I think I would try to show a modal form that contains my code to do the
updating with some kind of progress bar...when the updating is done, return from the modal form. Disabling the controls results in sometimes dim fields and screen flashing that is annoying. -- Show quoteHide quoteDennis in Houston "Marina" wrote: > Thanks everyone, I had a feeling disabling all the controls was the way to > go. > > "Marina" <someone@nospam.com> wrote in message > news:%23kj%23McdHGHA.1132@TK2MSFTNGP10.phx.gbl... > > What is the right way to go about making sure an application is not frozen > > and unresponsive while a relatively long running process is going on? The > > process is making updates to the UI, which the user needs to see as they > > are being made. However, it is desirable that the user is not able to > > actually interact with the application as far as clicking buttons, etc, > > goes. > > > > Application.DoEvents seems to update the UI nicely, but the user can still > > interact with the form, which is not good. Is DoEvents the right way to > > go here, and must all form elements that should not be interactive be > > disabled for the duration of the process? > > > > Any thoughts on this? > > > > >
CHANGING DATA TYPE
Get information about Dial Up connections? Changed Date on PC, now project doesn't compile source code changes Compressing (zipping) files dispose the login form Job LastRunOutCome?? Save lines drawn in the picturebox as an lmage NetUserChangePassword Module not found?? How to close an application?? Parsing a string - please help |
|||||||||||||||||||||||