Example with Textbox Control:-



Add a new Form i.e., Form4 to the Windows Forms Application
Create four textBboxes on the Form
Set the following  properties to the labels & textBoxes:

label1:-
Name       :    lblNormal
Text          :    Normal Textbox

label2:-
Name      :    lblMultiline
Text         :     Multiline Textbox

label3:-
Name      :    lblPassword
Text         :     Password Textbox

label4:-
Name      :    lblReadonly
Text         :    ReadOnlyTextbox

textBox1:-
Name     :   txtNormal


textBox2:-
Name      :   txtMultiline
Multiline :  True

textBox3:-  
Name      :   txtPassword
PasswordChar   :   *

textBox4:-
Name         :    txtReadOnly
Text            :     Sampath
ReadOnly   :    True





























Design:-


Run the Application & Check
Enter the text in textboxes
You cannot edit the data in Readonly Textbox Text bcz it is ReadOnly

Result:-



No comments:

Post a Comment