home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch12-UsingStandardControls / UserControl1.vb < prev   
Text File  |  2001-09-03  |  2KB  |  78 lines

  1. Public Class UserControl1
  2.     Inherits System.Windows.Forms.UserControl
  3.  
  4. #Region " Windows Form Designer generated code "
  5.  
  6.     Public Sub New()
  7.         MyBase.New()
  8.  
  9.         'This call is required by the Windows Form Designer.
  10.         InitializeComponent()
  11.  
  12.         'Add any initialization after the InitializeComponent() call
  13.  
  14.     End Sub
  15.  
  16.     'UserControl1 overrides dispose to clean up the component list.
  17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  18.         If disposing Then
  19.             If Not (components Is Nothing) Then
  20.                 components.Dispose()
  21.             End If
  22.         End If
  23.         MyBase.Dispose(disposing)
  24.     End Sub
  25.     Friend WithEvents Button1 As System.Windows.Forms.Button
  26.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  27.  
  28.     'Required by the Windows Form Designer
  29.     Private components As System.ComponentModel.Container
  30.  
  31.     'NOTE: The following procedure is required by the Windows Form Designer
  32.     'It can be modified using the Windows Form Designer.  
  33.     'Do not modify it using the code editor.
  34.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  35.         Me.Button1 = New System.Windows.Forms.Button()
  36.         Me.TextBox1 = New System.Windows.Forms.TextBox()
  37.         Me.SuspendLayout()
  38.         '
  39.         'Button1
  40.         '
  41.         Me.Button1.Location = New System.Drawing.Point(8, 24)
  42.         Me.Button1.Name = "Button1"
  43.         Me.Button1.Size = New System.Drawing.Size(136, 40)
  44.         Me.Button1.TabIndex = 0
  45.         Me.Button1.Text = "Button1"
  46.         '
  47.         'TextBox1
  48.         '
  49.         Me.TextBox1.Location = New System.Drawing.Point(8, 96)
  50.         Me.TextBox1.Name = "TextBox1"
  51.         Me.TextBox1.Size = New System.Drawing.Size(136, 20)
  52.         Me.TextBox1.TabIndex = 1
  53.         Me.TextBox1.Text = "TextBox1"
  54.         '
  55.         'UserControl1
  56.         '
  57.         Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox1, Me.Button1})
  58.         Me.Name = "UserControl1"
  59.         Me.ResumeLayout(False)
  60.  
  61.     End Sub
  62.  
  63. #End Region
  64.  
  65.     Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  66.  
  67.     End Sub
  68.  
  69.     Public Property ButtonText() As String
  70.         Get
  71.             Return Button1.Text
  72.         End Get
  73.         Set(ByVal Value As String)
  74.             Button1.Text = Value
  75.         End Set
  76.     End Property
  77. End Class
  78.