Saturday, 18 August 2012

What are the various components of

Visual Basic is a third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model first released in 1991. The final release was version 6 in 1998. Microsoft's extended support ended in March 2008 and the designated successor was Visual Basic .NET .

User Control Components in VB.NET:

You will have a small problem if you have the VB.NET 1.X Standard Edition. User controls have to be created as DLL's to be used in other projects and this version won't create DLL libraries "out of the box". It's a lot more trouble, but you can use techniques described in this article to learn how to get around this problem. 

Create a new Windows Control Library. The illustration below shows the VB.NET 1.X dialog. 

Click Here to display the illustration

Click the Back button on your browser to return

From the VB main menu, click Project, then Add User Control. This gives you a form design environment almost identical to the one you use for building standard Windows applications.

Click Here to display the illustration

Click the Back button on your browser to return

Add the components and code for your control and customize the properties you need. You can copy and paste from your debugged standard Windows app. In fact, the code for the CalcPad control was copied with no changes.

Build your solution to get the DLL file for your control. Remember to change the Configuration to Release before the Build for production use.

To move the control to the Toolbox, right-click on the Toolbox and select Add/Remove Items .

Using the .NET Framework Components tab, Browse to the DLL for your component. Click Open when the DLL file is selected to move the control to the Toolbox, then click OK. The illustration below shows CalcPad in the VB.NET 1.1 Toolbox.

No comments:

Post a Comment