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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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


    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

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek