hi
when i press (*) how to get (.) in TextBox (in C# WinCE)
i have TextBox and when i press the (*) letter i want to get the (.) letter
thank's in advance
hi
when i press (*) how to get (.) in TextBox (in C# WinCE)
i have TextBox and when i press the (*) letter i want to get the (.) letter
thank's in advance
Use the keypress and if the key is a '*' then replace it with '.'?
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyCode == Keys.Multiply) e.KeyCode = Keys.OemPeriod;
}
if you can't set the e.KeyCode then you can do:
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyCode == Keys.Multiply)
{
e.Handled = true;
tb.Text += "."
}
}