Click here to Skip to main content
15,909,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have project i need to some text-boxes, maybe one or two and more, how can i reach the value of that text-boxes?????

this is my function in below

Public Function AddNewTextBox() As System.Windows.Forms.TextBox
Dim txt As New System.Windows.Forms.TextBox()
Me.Controls.Add(txt)
txt.Top = cLeft * 35
txt.Left = 835
txt.Text = "TextBox " & Me.cLeft.ToString
txt.Name = "TextBox" & Me.cLeft.ToString
txt.Font = ffformat
cLeft = cLeft + 1
Return txt

End Function

please help me
Posted
Comments
ZurdoDev 30-Dec-15 9:35am    
Give your textbox an id and then you can access it.
duhoky 3-Jan-16 2:12am    
how i give it ??
Ivan_FM 13-Feb-16 7:09am    
You have gived an unique name to the textbox when create it... then, use this name as a referal.

Hint: Use more específic name, in exemple, giving an optional parameter throw the function that adds the textbox name when you call it.
duhoky 14-Feb-16 9:05am    
thanks, good idea :) Ivan_FM

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