VB.Net
  Home arrow VB.Net arrow Everything You Wanted to Know About Forms ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
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? 
VB.NET

Everything You Wanted to Know About Forms Inheritance in VB.Net
By: Saurabh Verma
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 174
    2003-10-29

    Table of Contents:
  • Everything You Wanted to Know About Forms Inheritance in VB.Net
  • Concept of Inheritance
  • Visual Inheritance
  • What’s New in This Article
  • What's New in This Article, Cont'd
  • Conclusion

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Lose your application development headaches. Start developing and deploying applications with Advantage Database Server today. Download a 30-day trial for Free!

    Everything You Wanted to Know About Forms Inheritance in VB.Net
    (Page 1 of 6 )

    Learn how to take advantage of Forms Inheritance, while being introduced to certain Object Oriented approaches, in Saurabh's latest article.

    A major change occurred for VB programmers when Microsoft announced that the launch of their new VB.NET was to become the successor for the Visual Basic programming language.

    What VB lacks is the power of INHERITANCE, so Microsoft decided to implement inheritance in VB.NET. Every time we need a new form in our applications we create a new instance of the System.Windows.Forms.Form class, change its properties to suit our needs, place some controls and our form is ready for use.  As we know, by placing some controls onto a new form, we extend the forms class to NewForm1, meaning we have created a new class with a name NewForm1. Our new form is a class; we can extend any class due to inheritance supported in .NET.

    So from this we can conclude that we can design the base form and use the base form design in all our forms:

    Base Form:
    Public Class PMainForm
        Inherits System.Windows.Forms.Form

    Child Forms:
    Public Class Child1
        Inherits PMainForm

    Now we can use the Child Forms in the ways we desired. Things we can do with our child forms: override the functionality of the base form within the child form itself (i.e. using Shadows keyword in our functions in the child form – we will also see this in detail later on in this article), we can add custom properties to our base form and set them in the child forms (for controlling the controls which originally do not exist in the parent form) and anything else we’d like.

    More VB.Net Articles
    More By Saurabh Verma


     

    VB.NET ARTICLES

    - MyClass - Implementing Polymorphism in VB.Net
    - Building a News Ticker Using VB.Net
    - Everything You Wanted to Know About Forms In...
    - Building Assemblies with VB.Net
    - Simple VB.NET Notify Icon with Panel Applica...
    - Regular Expressions in .NET
    - String Encryption With Visual Basic .NET
    - Deploying Applications in VB.NET: Part 1/2
    - Watching Folder Activity in VB.NET
    - Creating A Windows Service in VB.NET
    - Implementing The Google Web Service In VB.NET
    - Migrating to Visual Basic.NET from Visual Ba...


     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     





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