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
Wrap
Text File
|
2001-09-03
|
2KB
|
78 lines
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
#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
'UserControl1 overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
'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.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(8, 24)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(136, 40)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(8, 96)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(136, 20)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = "TextBox1"
'
'UserControl1
'
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox1, Me.Button1})
Me.Name = "UserControl1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Public Property ButtonText() As String
Get
Return Button1.Text
End Get
Set(ByVal Value As String)
Button1.Text = Value
End Set
End Property
End Class