C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to Create TextBox Control dynamically


Posted Date: 13 Mar 2007    Resource Type: Code Snippets    Category: Winforms Controls

Posted By: Bhavesh Rana       Member Level: Silver
Rating:     Points: 10



This code sample shows how you can create a textbox control dynamically. The important thing is we need to add this control in the container (in this case it is a windows form, it can be panel also)



' This is used to set X-coordinate of dynamic TextBox
Dim LocXPosition As Integer = 20

' This is used to set Y-coordinate of dynamic TextBox
Dim LocYPosition As Integer = 20

' This will create dynamic TextBox...
Dim LocTextBox As New TextBox

' We need to set Location of the Point, At this point TextBox's X and Y coordinate will start...
LocTextBox.Location = New Point(20, 20)

' We need to set container of the control...
Me.Controls.Add(LocTextBox)





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Read a specific line in Multiline textbox
Previous Resource: Listbox selecteditem problem if we bind data using its datasource property
Return to Discussion Resource Index
Post New Resource
Category: Winforms Controls


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

Help Desk

Contact Us    Privacy Policy    Terms Of Use