Option Strict Off
Option Explicit On

Friend Class Entertime
  Inherits System.Windows.Forms.Form

#Region "Windows Form Designer generated code "
  Public Sub New()
    MyBase.New()
    If m_vb6FormDefInstance Is Nothing Then
      If m_InitializingDefInstance Then
        m_vb6FormDefInstance = Me
      Else
        Try
          'For the start-up form, the first instance created is the default instance.
          If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
            m_vb6FormDefInstance = Me
          End If
        Catch
        End Try
      End If
    End If
    'This call is required by the Windows Form Designer.
    InitializeComponent()
  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
  'Required by the Windows Form Designer
  Private components As System.ComponentModel.Container
  Public ToolTip1 As System.Windows.Forms.ToolTip
  Public WithEvents lsTimes As System.Windows.Forms.ListBox
  Public WithEvents btEntertm As System.Windows.Forms.Button
  Public WithEvents txTime As System.Windows.Forms.TextBox
  Public WithEvents Label1 As System.Windows.Forms.Label
  '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.components = New System.ComponentModel.Container()
    Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
    Me.ToolTip1.Active = True
    Me.lsTimes = New System.Windows.Forms.ListBox()
    Me.btEntertm = New System.Windows.Forms.Button()
    Me.txTime = New System.Windows.Forms.TextBox()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.Text = "Enter times"
    Me.ClientSize = New System.Drawing.Size(312, 213)
    Me.Location = New System.Drawing.Point(4, 23)
    Me.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.BackColor = System.Drawing.SystemColors.Control
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
    Me.ControlBox = True
    Me.Enabled = True
    Me.KeyPreview = False
    Me.MaximizeBox = True
    Me.MinimizeBox = True
    Me.Cursor = System.Windows.Forms.Cursors.Default
    Me.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.ShowInTaskbar = True
    Me.HelpButton = False
    Me.WindowState = System.Windows.Forms.FormWindowState.Normal
    Me.Name = "Entertime"
    Me.lsTimes.Size = New System.Drawing.Size(113, 124)
    Me.lsTimes.Location = New System.Drawing.Point(96, 72)
    Me.lsTimes.TabIndex = 3
    Me.lsTimes.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.lsTimes.BackColor = System.Drawing.SystemColors.Window
    Me.lsTimes.CausesValidation = True
    Me.lsTimes.Enabled = True
    Me.lsTimes.ForeColor = System.Drawing.SystemColors.WindowText
    Me.lsTimes.IntegralHeight = True
    Me.lsTimes.Cursor = System.Windows.Forms.Cursors.Default
    Me.lsTimes.SelectionMode = System.Windows.Forms.SelectionMode.One
    Me.lsTimes.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.lsTimes.Sorted = False
    Me.lsTimes.TabStop = True
    Me.lsTimes.Visible = True
    Me.lsTimes.MultiColumn = False
    Me.lsTimes.Name = "lsTimes"
    Me.btEntertm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
    Me.btEntertm.Text = "Enter"
    Me.AcceptButton = Me.btEntertm
    Me.btEntertm.Size = New System.Drawing.Size(49, 29)
    Me.btEntertm.Location = New System.Drawing.Point(224, 16)
    Me.btEntertm.TabIndex = 2
    Me.btEntertm.BackColor = System.Drawing.SystemColors.Control
    Me.btEntertm.CausesValidation = True
    Me.btEntertm.Enabled = True
    Me.btEntertm.Cursor = System.Windows.Forms.Cursors.Default
    Me.btEntertm.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.btEntertm.TabStop = True
    Me.btEntertm.Name = "btEntertm"
    Me.txTime.AutoSize = False
    Me.txTime.Size = New System.Drawing.Size(73, 27)
    Me.txTime.Location = New System.Drawing.Point(104, 16)
    Me.txTime.TabIndex = 0
    Me.txTime.AcceptsReturn = True
    Me.txTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
    Me.txTime.BackColor = System.Drawing.SystemColors.Window
    Me.txTime.CausesValidation = True
    Me.txTime.Enabled = True
    Me.txTime.ForeColor = System.Drawing.SystemColors.WindowText
    Me.txTime.HideSelection = True
    Me.txTime.ReadOnly = False
    Me.txTime.MaxLength = 0
    Me.txTime.Cursor = System.Windows.Forms.Cursors.IBeam
    Me.txTime.Multiline = False
    Me.txTime.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.txTime.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txTime.TabStop = True
    Me.txTime.Visible = True
    Me.txTime.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.txTime.Name = "txTime"
    Me.Label1.Text = "Enter time"
    Me.Label1.Size = New System.Drawing.Size(65, 17)
    Me.Label1.Location = New System.Drawing.Point(16, 24)
    Me.Label1.TabIndex = 1
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopLeft
    Me.Label1.BackColor = System.Drawing.SystemColors.Control
    Me.Label1.Enabled = True
    Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
    Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
    Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.Label1.UseMnemonic = True
    Me.Label1.Visible = True
    Me.Label1.AutoSize = False
    Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.None
    Me.Label1.Name = "Label1"
    Me.Controls.Add(lsTimes)
    Me.Controls.Add(btEntertm)
    Me.Controls.Add(txTime)
    Me.Controls.Add(Label1)
  End Sub
#End Region

#Region "Upgrade Support "
  Private Shared m_vb6FormDefInstance As Entertime
  Private Shared m_InitializingDefInstance As Boolean
  Public Shared Property DefInstance() As Entertime
    Get
      If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
        m_InitializingDefInstance = True
        m_vb6FormDefInstance = New Entertime()
        m_InitializingDefInstance = False
      End If
      DefInstance = m_vb6FormDefInstance
    End Get
    Set(ByVal Value As Entertime)
      m_vb6FormDefInstance = Value
    End Set
  End Property
#End Region

  Private tm As Times = New Times()

  Private Sub btEntertm_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btEntertm.Click
    tm.setText(txTime.Text)
    lsTimes.Items.Add(tm.getFormatted)
  End Sub

End Class