Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Using ENTER key instead of TAB key for Navigation


Message #1 by Talon Wolles <ta_iwo@y...> on Mon, 20 Jan 2003 17:49:57 -0800 (PST)
Thank you Manhal M Shukayr. It is okay now. You are
great. Thank you all.

-Talon

--- Manhal M Shukayr <mshukayr@r...>
wrote:
> Add the following line after the endif and before
> the end function
> statements
> 
>     check_keypress = tx
> 
> I do not use a function, just put the code in the
> keypress of the form.
> However, if you want to test for other things, the
> function is probably the
> best way to do this.
> 
> Manhal M Shukayr
> mshukayr@r...
> www.river-cities.com
> 
> 
> River Cities Software
> 
> ----- Original Message -----
> From: "Talon Wolles" <ta_iwo@y...>
> To: "professional vb" <pro_vb@p...>
> Sent: Saturday, January 25, 2003 8:04 PM
> Subject: [pro_vb] RE: Using ENTER key instead of TAB
> key for Navigation
> 
> 
> > I thank Wong Tze Lun, Marco Straforini, Manhal M
> > Shukayr, Rommel Relosa, Dave P and Tim Rupp over
> the
> > use of ENTER key for navigation. You guys are
> great.
> >
> > Though the code I used is working fine but there
> is
> > this major problem. At each control, it does not
> > accept any input except to move to next control
> with
> > ENTER or Tab key. What could be the problem.
> > Now this is what I did.
> >
> > In my module file, I set up this function.
> >
> >   Public function check_keypress(tx as integer)
> >      if tx=13 then
> >          sendkeys "{tab}"
> >          tx=0
> >      endif
> >   end function
> >
> > Then in a form that has many controls:
> >
> >   In the form_load() subroutine, I have this below
> > line code. It does not work if I don't have this
> line.
> >
> >       keypreview=true
> >
> >
> > Then I have this subroutine code:
> >   private sub form_keypress(xx as integer)
> >     xx=check_keypress(xx)
> >   end sub
> >
> >
> >  Like I said before, it navigates fine with ENTER
> or
> > Tab key but does not allow any other key inputs
> > What is wrong with my coding?
> >
> > -Talon
> >
> >
> >
> > --- Dave P <rwaters44@h...> wrote:
> > > The only difference between my version and Tim's
> is
> > > that instead of
> > > repeating the code for each control I just make
> it
> > > it's own Function and put
> > > the same code in it.
> > >
> > > Private Function Check_KeyPress (KeyPressed As
> > > Integer)
> > >      If KeyPressed = 13 Then  ' ENTER key.
> > >         SendKeys "{tab}"    ' Set focus to next
> > > control
> > >         KeyPressed = 0        ' Ignore key
> > >      End If
> > > End Function
> > >
> > > And for each control I then put;
> > > Private Sub Text1_KeyPress (KeyAscii As Integer)
> > >      KeyAscii = Check_KeyPress(KeyAscii)
> > > End Sub
> > >
> > > The only reason I do this is because a lot of my
> > > apps make use of all kinds
> > > of different custom key settings that are user
> > > definable. This way I can
> > > customize the Function to react any way I want
> for
> > > all the controls without
> > > changing the code for each and every control.
> > >
> > > OK, so mine is above and beyond what you asked,
> just
> > > hopefully spawning some
> > > new ideas.
> > >
> > >
> > > Dave(Hobbes)
> > > rwaters44@h...
> > >
> > >
> > > ----Original Message Follows----
> > > From: "Tim Rupp" <tim@t...>
> > > Reply-To: "professional vb"
> <pro_vb@p...>
> > > To: "professional vb" <pro_vb@p...>
> > > Subject: [pro_vb] RE: Using ENTER key instead of
> TAB
> > > key for Navigation
> > > Date: Mon, 20 Jan 2003 21:55:45 -0500
> > >
> > > One way would be to add this routine for each
> > > control....
> > >
> > > Private Sub Text1_KeyPress (KeyAscii As Integer)
> > >      If KeyAscii = 13 Then  ' ENTER key.
> > >         SendKeys "{tab}"    ' Set focus to next
> > > control
> > >         KeyAscii = 0        ' Ignore key
> > >      End If
> > > End Sub
> > >
> > >
> > > /tim
> > >
> > > -----Original Message-----
> > > From: Talon Wolles [mailto:ta_iwo@y...]
> > > Sent: Monday, January 20, 2003 8:50 PM
> > > To: professional vb
> > > Subject: [pro_vb] Using ENTER key instead of TAB
> key
> > > for Navigation
> > >
> > > Hi All,
> > >
> > > Writing in VB6, please how do I use the ENTER
> key
> > > instead of the default TAB key to move from one
> > > input
> > > box to another in a form?
> > >
> > > -Talon
> > >
> > >
> > >
> __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > > now.
> > > http://mailplus.yahoo.com
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
_________________________________________________________________
> > > Help STOP SPAM: Try the new MSN 8 and get 2
> months
> > > FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> 
=== message truncated ===


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

  Return to Index