Extend the System

Top  Previous  Next

This tutorial will shows how to extend the new forms by creating and inheriting parent forms, and because parent form has written all the processing code, user are main left to design focus on user requirements only.


Below are some the source code use in the tutorial for Form1


   Public Overrides Sub DBControlsEnabled(ByVal InValue As Boolean)

   'Use to control form's controls' enable / disable status during Add, Edit, Save, Cancel operation.


   Public Overrides Property SystemManager() As CSAccountDatabaseIntf.ICSAccountDatabaseIntf

  'The SystemManager represent the server object to access all the function and procedure at server, connected by .net remoting.


   Public Overrides Property KeyInfo() As CSAccountDatabaseIntf.FormKeyInfo

   'Reserve for future use, just copy from other form


   Private Sub FmAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


   End Sub

  'Bind the MST_ACCOUNTBindingGSource which all other controls bind to


Most of the time just copy and overrides from the other forms' source code implementation will do.


If most of the time is same, why not just write the code in parent form? This is because limitation of Visual Studio 2005 to support some controls in visual inheritance such as BindingNavigator and DataGridView in visual inheritance. Next version of Visual Studio should have better support for visual inheritance.


5 major steps you are finish with extending new forms.


1. Create New Dataset

2. Add Interface and Server Implementation

3. Create new Module

4. Read The Module to Database

5. Authorize Security Access for Added Form