Creating the Project

Team-Fly team-fly    

ADO.NET Programming in Visual Basic .NET
By Steve  Holzner, Bob  Howell

Table of Contents
Chapter 11.   Creating Your Own Data Control

Shall we begin? Start by closing any open projects or solutions. Create a project. When prompted, select Windows Control Library. Name the project DataControl. This will create a Windows Control Library project with a default UserControl class called UserControl1.vb. Select UserControl1.vb in the Project window and open the code view. Notice that the control is just a class that inherits from windows .forms.UserControl. Change the programmatic name of the class to ucDataNav for data navigator. Do this by simply overtyping UserControl1 with ucDataNav right in the source code. To be consistent let's also change the source code file name to match. Do this right in the Project window. Note two things: Changing the name in the window renames the disk file and there is no code except that which was generated by the designer. This is collapsed in the region labeled Windows Form Designer Generated Code. Yet there are already lots of properties listed in the Properties window. Where did they come from? As with forms, they are defined in the base class. Ah, the beauty of inheritance.

Team-Fly team-fly    

ADO. NET Programming in Visual Basic. NET
ADO.NET Programming in Visual Basic .NET (2nd Edition)
ISBN: 0131018817
EAN: 2147483647
Year: 2005
Pages: 123

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: