I think what J Merrill meant is that you _don't_ cache the keystrokes. You do server queries on the background thread, when you get a response you output it and send the next command. You do cache commands though, when the user presses Enter, you add another command to the buffer (queue). If at that moment nothing is executed, the command gets to the server right away. Otherwise it has to wait until the current command finishes and all other commands that were in the queue finish.
HTH, Gecko On 6/24/05, Jonathan <[EMAIL PROTECTED]> wrote: > My question is how we cache the keystrokes or just let the system to do it. > Does it have any build-in keyboard buffer that we can manipulate? For > example, we tell the system to stop generating any key event and store the > keystrokes until we say so. Otherwise, we have to manually catch all key > events and put into our buffer then replay the action later. > > > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of J. Merrill > Sent: Friday, 24 June 2005 11:52 AM > To: [email protected] > Subject: Re: [ADVANCED-DOTNET] Keyboard events > > If you do the request-and-wait on a different thread, for example by using > the thread pool, I'd think that the user could type ahead normally. The > main app thread won't be "tied up" if the GUI thread isn't stuck waiting for > the response. > > At 08:53 PM 6/23/2005, Jonathan wrote > >Actually, it is a server-client application. We would like to allow the > user > >to typing ahead during waiting for the server respond. Therefore, we need > to > >capture the user action and take effect later. Originally, it is a command > >based application. Now, we are trying to build a GUI and match the original > >command. > > > > > >-----Original Message----- > > > >From: Unmoderated discussion of advanced .NET topics. > >[mailto:[EMAIL PROTECTED] On Behalf Of J. Merrill > >Sent: Friday, 24 June 2005 9:53 AM > >To: [email protected] > >Subject: Re: [ADVANCED-DOTNET] Keyboard events > > > >At 07:16 PM 6/23/2005, Jonathan wrote (in part) > >> Does anyone have an idea how to pausing keyboard event generation from > >>the winform components then all the keystrokes will be remained in the > >>buffer until I resume them? Is there any build-in function like that or do > >I > >>have to implement on my own? > > > >I don't think that there is any "keyboard event generation" FROM "winform > >components". So it must be that I don't understand what you're asking. > Are > >you possibly hoping to capture keyboard events that come in when your > >application is busy, so they can take effect later (when it's not busy any > >more)? > > > >Would it be better to avoid having your app be unresponsive to keyboard > >input, maybe by doing your processing in another thread (so that the main > >thread stays responsive)? > > > > > >J. Merrill / Analytical Software Corp > > > >=================================== > >This list is hosted by DevelopMentor. http://www.develop.com > > > >View archives and manage your subscription(s) at http://discuss.develop.com > > > >=================================== > >This list is hosted by DevelopMentorR http://www.develop.com > > > >View archives and manage your subscription(s) at http://discuss.develop.com > > > > J. Merrill / Analytical Software Corp > > =================================== > This list is hosted by DevelopMentorR http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > -- You're going to reap just what you sow. Lt. Col. Gecko Pointdexter - expert specialist http://vebcaster.blogspot.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
