Click to See Complete Forum and Search --> : KeyAscii = 0


chunks
June 28th, 2008, 02:42 AM
hi everyone,
i use this code in VB for not to type anything in the TextBox on keypress event

KeyAscii = 0


how this code can be changed in VB.Net ?
i tried

e.KeyChar = 0

but does not work

HanneSThEGreaT
June 28th, 2008, 05:29 AM
You could use e.Handled = True

WillAtwell
June 28th, 2008, 11:37 AM
hi everyone,
i use this code in VB for not to type anything in the TextBox on keypress event

KeyAscii = 0


how this code can be changed in VB.Net ?
i tried

e.KeyChar = 0

but does not work

Dot net uses the actual character rather than the numeric code for the character.

e.keychar=chr(0)