Visual Basic.NET
  Home arrow Visual Basic.NET arrow Inheritance and Windows Forms
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Inheritance and Windows Forms
By: Mohammed Qattan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 25
    2004-01-26

    Table of Contents:
  • Inheritance and Windows Forms
  • Exploring Forms
  • Validating Inputs
  • Carrying Out the Scenario
  • Explanation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Inheritance and Windows Forms


    (Page 1 of 5 )

    VB.net is now considered an object oriented language with the new core changes in the language carried by Microsoft in this new edition of Visual basic. The object oriented programming has proven itself to be very powerful, robust, and beautiful to work with. Well, enough theories and marketing stuff and let’s get to the real thing! In this article we will not be only talking about a class’s inheritance, but will also take advantage of the Windows form inheritance that was produced Visual Studio.NET. (Yes, the forms are classes and can be inherited.) Let’s get on with it!

    Let’s say that we are developing software for a mobiles company. We have technicians, and we certainly have some managers. As a matter of fact, both the technicians and the managers are employees in this mobiles company. Employees have names, and Age (for simplicity).  Managers do management activities, and Technicians do the technical activities. So if we want to put this into code, then we will have the following:

    1) Employee Class: which have the most common things between the Managers and technicians, in our case, the name and age.

    2) Manager Class: since the manager is in essence and Employee, then this class will inherit its basics from the Employee Class.

    3) Technician Class: again, a Technician is an Employee, and this class should inherit its basics from the Employee Class.

    So far, so good. Straight forward implementation, to be sure - but where is the beef?

    Well, since out application is to work with the objects mentioned above, then yes, what you are thinking of is true; there should be some windows forms to help me interact with these objects. So we will be talking about a very basic form that will enable the users from adding new Manager, Technician, in other words and Employee.

    Go ahead and download the project and open the solution to have a better understanding about what’s going on. As you can see, we have three classes in the “Classes” folder under the project, which contain (as expected) the Employee class, with a Name and an Age, and the other two classes that are inheriting from the Employee class: Manager and Technician.

    More Visual Basic.NET Articles
    More By Mohammed Qattan


     

    VISUAL BASIC.NET ARTICLES

    - Creating and Drawing a Game Map in VB.NET
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway