From: Nobody on 30 Mar 2010 17:46 "David" <NoWhere(a)earthlink.net> wrote in message news:eEnVpKD0KHA.4492(a)TK2MSFTNGP05.phx.gbl... > 2) If the user wishes to alter a control contents (textbox in this case) > they go to the Edit menu and select Edit (allows altering of textbox > contents) -- or -- Add (clears the textbox and allows input). Compared to many software products, this would require an extra click just to start updating or correcting information. This makes the software harder to use. You may want to rethink the Edit button. If you must, at least make the software makes a beeping sound if the user tried to type or click on a TextBox, so he or she remembers to click on the Edit button first.
From: MikeD on 30 Mar 2010 18:17 "David" <NoWhere(a)earthlink.net> wrote in message news:eOBR1F7zKHA.6140(a)TK2MSFTNGP05.phx.gbl... > Mr. Petersons "Key Preview" reminder resolved things easily. > > Mr. Toews and MikeD. > > Out of curiousity and future need, is there anyway to code for the "Esc" > key in the command_click event? > If you can trap it in command_click, would definitely reduce need for > multiple command buttons. Not in the Click event, but you could in the KeyPress event. But I don't see the need. If the command button is off the form as I said, then there are only 2 ways its Click event can fire. Those are by the user pressing the Escape or you via code setting the command button's Value property to True. So, I don't why you'd need multiple command buttons. There's only 1 needed to "capture" when the Esc key is pressed. Or maybe I'm not understanding something. -- Mike
From: MikeD on 30 Mar 2010 18:20 "Jeff Johnson" <i.get(a)enough.spam> wrote in message news:OpJg20B0KHA.4492(a)TK2MSFTNGP05.phx.gbl... > > I personally feel that the hidden button with Cancel = True is cheesy, > cheesy, cheesy. Use KeyPreview, plain and simple. Why?!?
From: ralph on 30 Mar 2010 19:01 On Mon, 29 Mar 2010 17:00:30 -0400, "David" <NoWhere(a)earthlink.net> wrote: >I have a form with several controls. > >Rather than writing code for each keypress or a single >procedure call by every controls keypress event, >what is the best way to globally trap the escape key? > To add to the pile. This is another example where a "code behind" pattern would be useful. If the data behind maintained a 'dirty flag' any attempt to navigate away could be caught and managed. Change presentation captions from [Exit] to [Apply] or [Cancel] as required. Only the [x] control on the title bar perhaps needs a confirmation. -ralph
From: Jeff Johnson on 31 Mar 2010 10:00
"MikeD" <nobody(a)nowhere.edu> wrote in message news:%23dS6$cF0KHA.1796(a)TK2MSFTNGP02.phx.gbl... >> I personally feel that the hidden button with Cancel = True is cheesy, >> cheesy, cheesy. Use KeyPreview, plain and simple. > > Why?!? Mind you I'm talking about the "hidden" cancel button scenario, where you put a button on the form but make it permanently invisible by making its coordinates -1000, -1000 or something like that and its only purpose for existing to to trap the Esc key. If the app was going to have a Cancel Changes button in plain view of the users then setting Cancel = True on that button makes perfect sense. |