Sub Textbox1_KeyPress (key) Textbox1.IgnoreKey End Sub
In what way? I tried it and it seems to feel the same to the user as setting the ReadOnly property.I tested it. It works but it's not perfect.
It was a quickly knocked up to test a point and the reference to System.Text is not needed. However even with that the dll I compiled works on my device.What I do know is that if I start a new #Sharp project and use your code, It will compile and run on the Desktop, but not my device :sign0148:
Sub Globals 'Declare the global variables here. End Sub Sub App_Start Form1.Show End Sub Sub cmdShow_Click txtReadOnly.Text=txtReadWrite.Text End Sub Sub txtReadonly_GotFocus txtReadWrite.Focus End Sub
Sorry Filippo but I am correct. I've run it in the IDE with a breakpoint on "AddEvent (objTextbox ,"KeyPress", "goIgnorekey")" in Sub ConvertTextboxToLabel(objTextbox) and every time you move the focus to txtReadWrite and then back to txtReadonly this statement is executed.You have not understood mine code! It should be only one beispiel like a text box readonly can become.