VB2005 & Smartphone development

  • Thread starter Thread starter Darhl Thomason
  • Start date Start date
D

Darhl Thomason

I'm developing an app for a Smartphone and want to add a text box that only
accepts numbers (much like in the contacts, the phone # fields only accept
numbers).

Thanks!

Darhl
 
I'm developing an app for a Smartphone and want to add a text box that only
accepts numbers (much like in the contacts, the phone # fields only accept
numbers).

Thanks!

Darhl

Is the Masked textbox available for smartphone apps? If so use it, if
not please post back.

Thanks,

Seth Rowe
 
rowe_newsgroups said:
Is the Masked textbox available for smartphone apps? If so use it, if
not please post back.

Thanks,

Seth Rowe

Hi Seth,

Thanks for replying. The masked text box is not available. The only
controls I have available are:

Pointer
CheckBox
ComboBox
HScrollBar
ImageList
Label
ListView
MainMenu
Panel
PictureBox
ProgressBar
TextBox
Timer
TreeView
VScrollBar

The TextBox control doe snot have an option that I can find for masked
input.

Darhl
 
Hi Seth,

Thanks for replying. The masked text box is not available. The only
controls I have available are:

Pointer
CheckBox
ComboBox
HScrollBar
ImageList
Label
ListView
MainMenu
Panel
PictureBox
ProgressBar
TextBox
Timer
TreeView
VScrollBar

The TextBox control doe snot have an option that I can find for masked
input.

Darhl

Ok, use a standard textbox and add a event handler to for the KeyPress
event and block the keystroke there.

Something like:

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Not Char.IsNumber(e.KeyChar) Then e.Handled = True
End Sub

Let me know how it works out!

Thanks,

Seth Rowe
 
rowe_newsgroups said:
Ok, use a standard textbox and add a event handler to for the KeyPress
event and block the keystroke there.

Something like:

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Not Char.IsNumber(e.KeyChar) Then e.Handled = True
End Sub

Let me know how it works out!

Thanks,

Seth Rowe

Thanks Seth, that did work.

Now, how about this...my smartphone (Cingular Blackjack) has a QWERTY
keyboard with the numbers "on top" of some of the letters. For example, the
1 is on the e key, 2 is on the t key, 3 is on the u key, etc. Is there a
way instead to have it substitute the numbers when the corresponding letter
key is pressed?

Something like

if keypressed = "e" then keypressed = "1"

I could probably wrangle my way through this with VB6, but I'm about as much
a newbie with VB05 as anyone.

Thanks again!

d
 
Back
Top