Form template for use with visual inheritance : Form Inheritance « GUI « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » GUI » Form InheritanceScreenshots 
Form template for use with visual inheritance
Form template for use with visual inheritance

Imports System
Imports System.Drawing
Imports System.Windows.Forms


Public Class MainClass

   Shared Sub Main()
        Dim myform As Form = New FrmInheritance()
        Application.Run(myform)

   End Sub ' Main

End Class


Public Class FrmInheritance
   Inherits Form

#Region " Windows Form Designer generated code "

   Public Sub New()
      MyBase.New()

      'This call is required by the Windows Form Designer.
      InitializeComponent()

      'Add any initialization after the InitializeComponent() call

   End Sub

   'Form overrides dispose to clean up the component list.
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
      If disposing Then
         If Not (components Is NothingThen
            components.Dispose()
         End If
      End If
      MyBase.Dispose(disposing)
   End Sub
   Friend WithEvents lblBug As System.Windows.Forms.Label
   Friend WithEvents lblCopyright As System.Windows.Forms.Label
   Friend WithEvents cmdLearn As System.Windows.Forms.Button

   'Required by the Windows Form Designer
   Private components As System.ComponentModel.Container

   'NOTE: The following procedure is required by the Windows Form Designer
   'It can be modified using the Windows Form Designer.  
   'Do not modify it using the code editor.
   <System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
      Me.lblCopyright = New System.Windows.Forms.Label()
      Me.cmdLearn = New System.Windows.Forms.Button()
      Me.lblBug = New System.Windows.Forms.Label()
      Me.SuspendLayout()
      '
      'lblCopyright
      '
      Me.lblCopyright.BackColor = System.Drawing.Color.LightYellow
      Me.lblCopyright.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
      Me.lblCopyright.Font = New System.Drawing.Font("Microsoft Sans Serif"11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblCopyright.ForeColor = System.Drawing.Color.MidnightBlue
      Me.lblCopyright.Location = New System.Drawing.Point(20178)
      Me.lblCopyright.Name = "lblCopyright"
      Me.lblCopyright.Size = New System.Drawing.Size(31829)
      Me.lblCopyright.TabIndex = 1
      Me.lblCopyright.Text = "Copyright."
      '
      'cmdLearn
      '
      Me.cmdLearn.BackColor = System.Drawing.Color.Snow
      Me.cmdLearn.Font = New System.Drawing.Font("Microsoft Sans Serif"14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.cmdLearn.ForeColor = System.Drawing.SystemColors.InfoText
      Me.cmdLearn.Location = New System.Drawing.Point(2099)
      Me.cmdLearn.Name = "cmdLearn"
      Me.cmdLearn.Size = New System.Drawing.Size(14459)
      Me.cmdLearn.TabIndex = 2
      Me.cmdLearn.Text = "Learn More"
      '
      'lblBug
      '
      Me.lblBug.BackColor = System.Drawing.Color.LightYellow
      Me.lblBug.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
      Me.lblBug.Font = New System.Drawing.Font("Microsoft Sans Serif"20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblBug.ForeColor = System.Drawing.Color.MidnightBlue
      Me.lblBug.Location = New System.Drawing.Point(2020)
      Me.lblBug.Name = "lblBug"
      Me.lblBug.Size = New System.Drawing.Size(31859)
      Me.lblBug.TabIndex = 0
      Me.lblBug.Text = "About"
      Me.lblBug.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
      '
      'FrmInheritance
      '
      Me.AutoScaleBaseSize = New System.Drawing.Size(615)
      Me.BackColor = System.Drawing.SystemColors.ActiveBorder
      Me.ClientSize = New System.Drawing.Size(358223)
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdLearn, Me.lblCopyright, Me.lblBug})
      Me.Name = "FrmInheritance"
      Me.Text = "Visual Inheritance"
      Me.ResumeLayout(False)

   End Sub

#End Region

   ' invoked when user presses Learn More button
   Private Sub cmdLearn_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgsHandles cmdLearn.Click

      MessageBox.Show("www.java2s.com ""Learn More", MessageBoxButtons.OK, _
         MessageBoxIcon.Information)
   End Sub ' cmdLearn_Click

End Class
           
       
Related examples in the same category
1.Frame Inherits from another Frame InheritanceFrame Inherits from another Frame Inheritance
ww__w__.__j___a_v___a_2__s_.___c_o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.