Hi all,

I want to know how can I achieve below VB.Net [Windows] code in CF environment?

Thanks.

VB.Net Code:
  1. Private Sub txtRemark2_KeyPress(ByVal sender As System.Object, _
  2.     ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRemark2.KeyPress
  3.         If IsNumeric(e.KeyChar) = True Then
  4.         Else
  5.             ' This is just an example. In actual, I will change the value to correspond key value.
  6.             e.KeyChar = "5"c
  7.         End If
  8.     End Sub


In Windows application, e.KeyChar is not read only so I can assign value back to it and it will reflect on textbox.
But in CF, it is read only that means I can't assign value to it.
Although in Object Browser, it said its "Gets" and "Sets", i can't assign value to it.
(Why the object browser shows us incorrect definition?????)

When I assign value, it will highlight and said this is 'Read Only'
Anybody can help me???
Thanks.