textbox.keypress problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use a kepress event on a simple textbox. I want to be able to
capture the enter key when using a handheld with a keypad. I want to be able
to just jump to the next textbox or comobox like any other desktop program. I
cant seam to get the event to fire. I have tried putting other things before
the ife.keychar just to see if it goes into the code, nothing? Is there
something else I am missing. I am in VS2003 when developing. Running on a
IPAQ PPC2002

This is the code.

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs)
If e.KeyChar = Chr(13) Then
ComboBox3.Focus()
End If
End Sub
 
Sergey,
Thanks for the info, I did update to the SP3. When I test in a plain form,
with just 2 textboxes it does work. On the form that I would like to use this
on I have a tabcontrol on the page. I have the textboxes on the tabcontrol,
all textboxes are on the same tab page. It's not firing when used there. Do
you know of any difference in a tab control?
 
I could not reproduce the problem that you described. I attached a file
with the source code that I used in my testing. Please let me know if it
works for you.

Hope this helps.
Thank you,
Serg.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: textbox.keypress problem
| thread-index: AcUc1VV771zsVbwgQru45ZymwW0xJg==
| X-WBNR-Posting-Host: 216.144.36.68
| From: "=?Utf-8?B?V00=?=" <[email protected]>
| References: <[email protected]>
<#[email protected]>
| Subject: Re: textbox.keypress problem
| Date: Sun, 27 Feb 2005 06:05:03 -0800
| Lines: 40
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.compactframework:71989
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Sergey,
| Thanks for the info, I did update to the SP3. When I test in a plain
form,
| with just 2 textboxes it does work. On the form that I would like to use
this
| on I have a tabcontrol on the page. I have the textboxes on the
tabcontrol,
| all textboxes are on the same tab page. It's not firing when used there.
Do
| you know of any difference in a tab control?
|
| "Sergey Bogdanov" wrote:
|
| > I have not seen anything wrong unless you did not install the latest SP.
| > CF1.0 SP2 includes some fixes concerning a KeyPress event:
| >
http://www.microsoft.com/downloads/details.aspx?familyid=359ea6da-fc5d-41cc-
ac04-7bb50a134556&displaylang=en
| >
| > The latest SP at this moment is SP3:
| >
http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&familyid=
a5a02311-194b-4c00-b445-f92bec03032f&displaylang=en
| >
| >
| > Best regards,
| > Sergey Bogdanov
| > http://www.sergeybogdanov.com
| >
| >
| > WM wrote:
| > > I am trying to use a kepress event on a simple textbox. I want to be
able to
| > > capture the enter key when using a handheld with a keypad. I want to
be able
| > > to just jump to the next textbox or comobox like any other desktop
program. I
| > > cant seam to get the event to fire. I have tried putting other things
before
| > > the ife.keychar just to see if it goes into the code, nothing? Is
there
| > > something else I am missing. I am in VS2003 when developing. Running
on a
| > > IPAQ PPC2002
| > >
| > > This is the code.
| > >
| > > Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e
As
| > > System.Windows.Forms.KeyPressEventArgs)
| > > If e.KeyChar = Chr(13) Then
| > > ComboBox3.Focus()
| > > End If
| > > End Sub
| >
|
 
Back
Top