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

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » GUI » Visual Inheritance 
14.93.1.Form template for use with visual inheritance
Form template for use with visual inheritance
Imports System.Windows.Forms

public class FormInheritance
   public Shared Sub Main
        Application.Run(New FrmInheritance)
   End Sub
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 lblText 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.lblText = 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 2002"
      '
      '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"
      '
      'lblText
      '
      Me.lblText.BackColor = System.Drawing.Color.LightYellow
      Me.lblText.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
      Me.lblText.Font = New System.Drawing.Font("Microsoft Sans Serif"20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblText.ForeColor = System.Drawing.Color.MidnightBlue
      Me.lblText.Location = New System.Drawing.Point(2020)
      Me.lblText.Name = "lblText"
      Me.lblText.Size = New System.Drawing.Size(31859)
      Me.lblText.TabIndex = 0
      Me.lblText.Text = "Text"
      Me.lblText.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.lblText})
      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("Message""Title", MessageBoxButtons.OK, _
         MessageBoxIcon.Information)
   End Sub ' cmdLearn_Click

End Class
14.93.Visual Inheritance
14.93.1.Form template for use with visual inheritanceForm template for use with visual inheritance
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.