Click here to Skip to main content
15,918,123 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello guys, I would like someone to help me, I want to know codes that I can use when click on button so that activate and select the field of text box which I want to make changes and deactivate others.

I would like also to know how to make descriptive message when someone is entered data or write something, to help him or her know what exactly the field is mean to do, to ovoid an wrong type of data to be entered in the system.

Ok, let thank you in advance hoping that you will help me out.

ok
Posted
Comments
Jameel VM 11-Sep-13 5:42am    
did you try anything?
DAVID DUSHIMIMANA 11-Sep-13 5:45am    
I don't how to make it, I m searching on Internet, I m developing my system using data bound control. but I don't know how I can activate and deactivate a field and even how to set a descriptive message.
I m looking for it but if you know please help me.
[no name] 11-Sep-13 5:48am    
"field of text box", textboxes to not have "fields" so your first question makes no sense.
"to ovoid an wrong type of data", it's called "defensive programming". It is up to you to use the appropriate controls and data validation to prevent this scenario.
DAVID DUSHIMIMANA 11-Sep-13 5:54am    
Ok, sorry I wanted to say a text box, how I can set the descriptive message and how I can activate and deactivate it.

1 solution

VB
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    'Set up a quick description
    ToolTip1.SetToolTip(TextBox1, "Enter a positive number")
    'TO activate
    TextBox1.Enabled = True
    'To Select the control
    TextBox1.Focus()
    'TO deactivat
    TextBox1.Enabled = False

End Sub


For the quick description, place the ToolTip control onto your form.
 
Share this answer
 
Comments
DAVID DUSHIMIMANA 11-Sep-13 8:47am    
Sir Love 2 code, thank you for your support, it has been helpful to me, may God bless you, I thank also Sir Jamel for his support in directing me, thank you so much.

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