VB 2010 Create Controls at Run-Time with events

How to Create Controls at Run-Time in 

VB 2010

VB 2010 Create controls at run-time
Visual Basic Online Course

Logic

The example will show you how to create a control (TextBox) at the Application Run-Time. This TextBox will allow only Numbers. We will create a new TextBox control with event  Text Changed when the form is clicked

Project Design

Create new VB 2010 Windows Application Project (MyPro), don't forget to always Save your project

How does it work

You RUN your project and then click on the Form (Form1) and then you will notice that a TextBox control was created with the same properties that we provided in our example in the code below.

TextBox Properties

Location : The cursor location when click on the Form1
Size : 120,300
Parent : Form1 (Me)
TextAlign : HorizontalAlignment.Left
ForeColor : Color.White
Name : MyNewText
Font : Times New Roman, 10, Regular, Point

Code

Popular posts from this blog

Visual Basic Online Courses DataGridView Add Edit Delete

VB .NET WebView2 WinForms tips

VB .NET Google Drive Api Source Code Example

Visual Basic 2010 Working With DataBase Full Project Example

DAO in VB .NET MS ACCESS Database

VB NET Check internet connection