Public Class frmTestLabelAndTextInPanel
Inherits System.Windows.Forms.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 Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Friend WithEvents btnQuit As System.Windows.Forms.Button
Friend WithEvents TestPanel As System.Windows.Forms.Panel
'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.btnQuit = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'btnQuit
'
Me.btnQuit.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte),
CType(255, Byte), CType(255, Byte))
Me.btnQuit.Location = New System.Drawing.Point(504, 216)
Me.btnQuit.Name = "btnQuit"
Me.btnQuit.Size = New System.Drawing.Size(72, 32)
Me.btnQuit.TabIndex = 0
Me.btnQuit.Text = "QUIT"
'
'frmTestLabelAndTextInPanel
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(255,
Byte), CType(192, Byte))
Me.ClientSize = New System.Drawing.Size(600, 261)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnQuit})
Me.Name = "frmTestLabelAndTextInPanel"
Me.Text = "Test Label And Text In Panel"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnQuit.Click
Application.Exit()
End Sub
Public Sub BuildExample()
'
'lblUpperLabel
'
Dim lblUpperLabel As New System.Windows.Forms.Label()
lblUpperLabel.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(192, Byte))
lblUpperLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
lblUpperLabel.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
lblUpperLabel.ImageAlign = System.Drawing.ContentAlignment.BottomLeft
lblUpperLabel.Name = "lblUpperLabel"
lblUpperLabel.Location = New System.Drawing.Point(0, 0)
lblUpperLabel.Size = New System.Drawing.Size(64, 24)
lblUpperLabel.TabStop = False
lblUpperLabel.Text = "8888"
lblUpperLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblLowerLabel
'
Dim lblLowerLabel As New System.Windows.Forms.Label()
lblLowerLabel = New System.Windows.Forms.Label()
lblLowerLabel.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(255, Byte))
lblLowerLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
lblLowerLabel.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
lblLowerLabel.ImageAlign = System.Drawing.ContentAlignment.BottomLeft
lblLowerLabel.Location = New System.Drawing.Point(0, 24)
lblLowerLabel.Name = "lblLowerLabel"
lblLowerLabel.Size = New System.Drawing.Size(64, 24)
lblLowerLabel.TabStop = False
lblLowerLabel.Text = "9999"
lblLowerLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'tbxUpperLeft
'
Dim tbxUpperLeft = New System.Windows.Forms.TextBox()
tbxUpperLeft.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(192, Byte))
tbxUpperLeft.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
tbxUpperLeft.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
tbxUpperLeft.Location = New System.Drawing.Point(64, 0)
tbxUpperLeft.Name = "tbxUpperLeft"
tbxUpperLeft.Size = New System.Drawing.Size(72, 24)
tbxUpperLeft.TabStop = False
tbxUpperLeft.Text = "-9.99"
tbxUpperLeft.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
tbxUpperLeft.WordWrap = False
'
'tbxLowerLeft
'
Dim tbxLowerLeft = New System.Windows.Forms.TextBox()
tbxLowerLeft.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(255, Byte))
tbxLowerLeft.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
tbxLowerLeft.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
tbxLowerLeft.Location = New System.Drawing.Point(64, 24)
tbxLowerLeft.Name = "tbxLowerLeft"
tbxLowerLeft.Size = New System.Drawing.Size(72, 24)
tbxLowerLeft.TabStop = False
tbxLowerLeft.Text = "-2.22"
tbxLowerLeft.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
tbxLowerLeft.WordWrap = False
'
'tbxUpperRight
'
Dim tbxUpperRight = New System.Windows.Forms.TextBox()
tbxUpperRight.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(192, Byte))
tbxUpperRight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
tbxUpperRight.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
tbxUpperRight.Location = New System.Drawing.Point(368, 0)
tbxUpperRight.Name = "tbxUpperRight"
tbxUpperRight.Size = New System.Drawing.Size(72, 23)
tbxUpperRight.TabStop = False
tbxUpperRight.Text = "-3.33"
tbxUpperRight.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
tbxUpperRight.WordWrap = False
'
'tbxLowerRight
'
Dim tbxLowerRight = New System.Windows.Forms.TextBox()
tbxLowerRight.BackColor = System.Drawing.Color.FromArgb(CType(255,
Byte), CType(192, Byte), CType(255, Byte))
tbxLowerRight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
tbxLowerRight.Font = New System.Drawing.Font("Courier New", 15.75!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
tbxLowerRight.Location = New System.Drawing.Point(368, 22)
tbxLowerRight.Name = "tbxLowerRight"
tbxLowerRight.Size = New System.Drawing.Size(72, 22)
tbxLowerRight.TabStop = False
tbxLowerRight.Text = "-3.33"
tbxLowerRight.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
tbxLowerRight.WordWrap = False
'
'pnlTest
'
Dim pnlTest As New System.Windows.Forms.Panel()
pnlTest.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte),
CType(255, Byte), CType(192, Byte))
pnlTest.Controls.AddRange(New System.Windows.Forms.Control() {tbxLowerRight,
tbxLowerLeft, tbxUpperRight, tbxUpperLeft, lblLowerLabel, lblUpperLabel})
pnlTest.Location = New System.Drawing.Point(32, 32)
pnlTest.Name = "pnlTest"
pnlTest.Size = New System.Drawing.Size(500, 48)
pnlTest.TabIndex = 1
Controls.AddRange(New System.Windows.Forms.Control() {pnlTest})
End Sub
End Class
Public Module MainModule
Sub main()
Dim frmMainTest As New frmTestLabelAndTextInPanel()
frmMainTest.BuildExample()
Application.Run(frmMainTest)
Application.Exit()
End Sub
End Module