Technical Training
VB.NET 2005Table of Contents
VB.NET Creating and Managing Components Part 1
VB.NET Creating and Managing Components Part 1 - Page 2
VB.NET Creating and Managing Components Part 1 - Page 3VB.NET Creating and Managing Components Part 1 Page - 3
VB.NET Creating and Managing Components Part 1
.
.
.
Inheriting from a UserControl
1. In Visual Studio create a new Control Class project.
2. Add to the class labels and textboxes as shown in the screenshot below.
3. You can also change the background color and any other display component property.

Let us assume that this control has been created to extend support for data entry across an organization. The control is then distributed to regions having their own servers and data structure. This control is created to provide support for data-entry to an organization. It is then distributed with each region having its own server and data structure. To provide a consistent look and feel over the organization this UserControl is devised. The SQL statement, connect string and organization name are some of the properties that can be set by external code. The following lines of code are added to the class.
In a new windows control project add new inherited control by right-clicking the project in the solution explorer. This will open up the “Add New Item” dialog box as shown below. In this dialog box choose the option inherited user control:
This will open the inheritance picker. Click on the browse button and navigate to the bin directory of the original UserControl that you had created earlier.. Choose the dll file and click OK. The screen shot is given below:

A new class is created and the code view of this class shows Visual Studio generated code. You can add your own code to these existing codes. The sample lines of code are given below:
You click on the Build menu and build the solution. This control can be added to the ToolBox and you can use this in any windows forms application.
The screen shot of the data – entry screen with incorrect value for Principle after the error message is dismissed

Error Message

The screen shot of the data – entry screen with incorrect value for Interest Rate after the error message is dismissed

VB.NET 2005
- VB.NET 2005 Free Training
- The .NET Framework Architecture Part 1
- The .NET Framework Architecture Part 2
- Application Class and Message Class
- Implementing Class Library Object
- Visual Studio.NET Namespaces
- .NET Assemblies
- Differences between VB.NET 1.0 and VB.NET 2.0
- Introducing VB.NET Windows Forms
- Visual Studio Windows Forms Designer
- Exploring the Forms Designer generated code
- Setting and Adding Properties to Windows Form
- Implementing Inheritance
- Event Handling In Visual Basic .NET
- Building Graphical Interface elements
- .NET Common Windows Forms Controls Part 1
- .NET Common Windows Forms Controls Part 2
- Common Controls and Handling Control Events
- DomainUpDown and NumericUpDown Controls
- Dialog Boxes in Visual Basic .NET
- Visual Studio Adding Controls to Windows Form
- VB.NET Validation Controls
- Working with Menu Controls
- VB.NET MDI Applications
- .NET Exceptions
- VB.NET Creating and Managing Components Part 1
- VB.NET Creating and Managing Components Part 2
- Simple Data Binding
- .NET Complex Data Binding
- .NET Data Form Wizard
- Data Manipulation with ADO.NET
- SQL Server Stored Procedures
- SQL Server Ad Hoc Queries
- Finding and Sorting Data in DataSets
- ADO.NET Object Model
- Working with DataSets
- Using XML Data
- Working with File System in .NET
- Creating Web Service
- Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
- Web Reference and Web Services
- Web Services - SOAP, WSDL, Disco and UDDI
- Web Application Testing in VB.NET 2005
- Web Application Tracing and Debugging
- Working with Legacy Code and COM Components
- ActiveX Controls and Legacy Code
- Windows Application Testing
- VB.NET Windows Application Testing
- Tracing VB.NET Windows Application
- Debugging Windows Applications In Visual Studio.NET 2005
- Deploying Windows Applications In Visual Studio.NET 2005
- Customizing Setup Project in Visual Studio.NET 2005
- Shared Assembly
- Microsoft .NET Creating Installation Components
- The Registry Editor in Visual Studio.NET 2005
- The File Types Editor







