Thread View: comp.lang.basic.visual
4 messages
4 total messages
Started by jl32040@corp02.d
Mon, 10 Jan 1994 17:50
Lost Lost Focue
Author: jl32040@corp02.d
Date: Mon, 10 Jan 1994 17:50
Date: Mon, 10 Jan 1994 17:50
7 lines
342 bytes
342 bytes
Lost 'Lostfocus' I have a program that works well if I tab out of the field, since I reformat what was just keyed in, but doesn't work if the Enter key is hit. I do have a default key set so the enter does cause activity, but the lost focus doesn't get executed. I fixed it by sending VB a tab, but would like a better way. Is there one?
Re: Lost Lost Focue
Author: jkm2@Ra.MsState.
Date: Mon, 10 Jan 1994 18:55
Date: Mon, 10 Jan 1994 18:55
26 lines
684 bytes
684 bytes
In article <2gsqt9$f2a@nz12.rz.uni-karlsruhe.de>, Frederik Ramm <ule3@rzstud1.rz.uni-karlsruhe.de> wrote: >Matthew B Cravit (cravitma@arctic.uucp) wrote: >: IF KeyAscii = 32 THEN ' Enter key, I think... > >13 is the ASCII code for th enter key, 32 is for space. > >Greetings >Fred > >-- >Frederik Ramm ## eMail ule3@rz.uni-karlsruhe.de ## fax +49 721 379786 Actually I think the KeyUp(Down) event is a better way b/c the KeyPress event is more for alphanumeric keys. I ran into a problem once when I tried to mix the two types of KeySearch events. Also try the constant.bas file It renames the enter key as something like KEY_ENTER(orRETURN) -Joel
Re: Lost Lost Focue
Author: cravitma@arctic.
Date: Tue, 11 Jan 1994 00:04
Date: Tue, 11 Jan 1994 00:04
31 lines
1132 bytes
1132 bytes
In article <1994Jan10.175055.1@corp02.d51.lilly.com> jl32040@corp02.d51.lilly.com writes: >Lost 'Lostfocus' >I have a program that works well if I tab out of the field, since I reformat >what was just keyed in, but doesn't work if the Enter key is hit. I do have a >default key set so the enter does cause activity, but the lost focus doesn't >get executed. I fixed it by sending VB a tab, but would like a better way. Is >there one? If I understand you correctly, what you want to happen is that when the Enter key is pressed, your Textbox.LostFocus event should be executed. Here is one way which comes to mind: SUB Textbox.Keypress (KeyAscii as Integer) IF KeyAscii = 32 THEN ' Enter key, I think... CALL Textbox.LostFocus END IF END SUB I don't know if this is necessarily better than what you have done; take it or leave it. /Matthew -- Matthew Cravit | All opinions expressed here are Michigan State University | my own. I don't speak for Michigan East Lansing, MI 48825 | State, and they don't speak for me E-Mail: cravitma@cps.msu.edu | (thank goodness).
Re: Lost Lost Focue
Author: ule3@rzstud1.rz.
Date: Tue, 11 Jan 1994 00:12
Date: Tue, 11 Jan 1994 00:12
11 lines
247 bytes
247 bytes
Matthew B Cravit (cravitma@arctic.uucp) wrote: : IF KeyAscii = 32 THEN ' Enter key, I think... 13 is the ASCII code for th enter key, 32 is for space. Greetings Fred -- Frederik Ramm ## eMail ule3@rz.uni-karlsruhe.de ## fax +49 721 379786
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads