Click here to Skip to main content
15,909,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make an activex component (axEditbox) read-only

thanxz Mr.yogeshptl

but there is no key press or any other key event for activex text box control i.e "axeditbox"

thanxz in advance
Posted
Updated 3-Mar-10 1:13am
v6

Set readOnly property true

or write code on keyPress event
e.Handled = true;
 
Share this answer
 
Hi, just write the code below:

textBoxName.ReadOnly = true;

now you can just read data from your textbox and can not type or change data.

to choose a method just click on your control and then from property window
choose the method.


have a nice time.
Arash Shirkhorshidi
 
Share this answer
 
If u want Read only the textbox goto property
choose any one
1.txtbox.Enabled=fasle
2.txtbox.Readonly=true

Code
3.
private void txtbox_KeyPress(object sender, KeyPressEventArgs e)
{

e.Handled = true;
}
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900