Public Class Form1
    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

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    '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.
    Friend WithEvents lblhead As System.Windows.Forms.Label
    Friend WithEvents lblusername As System.Windows.Forms.Label
    Friend WithEvents lblPas As System.Windows.Forms.Label
    Friend WithEvents txtUsername As System.Windows.Forms.TextBox
    Friend WithEvents txtPasword As System.Windows.Forms.TextBox
    Friend WithEvents cmdOK As System.Windows.Forms.Button
    Friend WithEvents cmdCancel As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.lblhead = New System.Windows.Forms.Label
        Me.lblusername = New System.Windows.Forms.Label
        Me.lblPas = New System.Windows.Forms.Label
        Me.txtUsername = New System.Windows.Forms.TextBox
        Me.txtPasword = New System.Windows.Forms.TextBox
        Me.cmdOK = New System.Windows.Forms.Button
        Me.cmdCancel = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'lblhead
        '
        Me.lblhead.AutoSize = True
        Me.lblhead.Location = New System.Drawing.Point(96, 24)
        Me.lblhead.Name = "lblhead"
        Me.lblhead.Size = New System.Drawing.Size(144, 16)
        Me.lblhead.TabIndex = 0
        Me.lblhead.Text = "Typ username and pasword"
        '
        'lblusername
        '
        Me.lblusername.AutoSize = True
        Me.lblusername.Location = New System.Drawing.Point(24, 56)
        Me.lblusername.Name = "lblusername"
        Me.lblusername.Size = New System.Drawing.Size(56, 16)
        Me.lblusername.TabIndex = 1
        Me.lblusername.Text = "Username"
        '
        'lblPas
        '
        Me.lblPas.AutoSize = True
        Me.lblPas.Location = New System.Drawing.Point(24, 88)
        Me.lblPas.Name = "lblPas"
        Me.lblPas.Size = New System.Drawing.Size(48, 16)
        Me.lblPas.TabIndex = 2
        Me.lblPas.Text = "Pasword"
        '
        'txtUsername
        '
        Me.txtUsername.Location = New System.Drawing.Point(96, 56)
        Me.txtUsername.Name = "txtUsername"
        Me.txtUsername.Size = New System.Drawing.Size(144, 20)
        Me.txtUsername.TabIndex = 3
        Me.txtUsername.Text = ""
        '
        'txtPasword
        '
        Me.txtPasword.Location = New System.Drawing.Point(96, 88)
        Me.txtPasword.Name = "txtPasword"
        Me.txtPasword.Size = New System.Drawing.Size(144, 20)
        Me.txtPasword.TabIndex = 4
        Me.txtPasword.Text = ""
        '
        'cmdOK
        '
        Me.cmdOK.Location = New System.Drawing.Point(256, 48)
        Me.cmdOK.Name = "cmdOK"
        Me.cmdOK.TabIndex = 5
        Me.cmdOK.Text = "OK"
        '
        'cmdCancel
        '
        Me.cmdCancel.Location = New System.Drawing.Point(256, 88)
        Me.cmdCancel.Name = "cmdCancel"
        Me.cmdCancel.TabIndex = 6
        Me.cmdCancel.Text = "Cancel"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(352, 141)
        Me.Controls.Add(Me.cmdCancel)
        Me.Controls.Add(Me.cmdOK)
        Me.Controls.Add(Me.txtPasword)
        Me.Controls.Add(Me.txtUsername)
        Me.Controls.Add(Me.lblPas)
        Me.Controls.Add(Me.lblusername)
        Me.Controls.Add(Me.lblhead)
        Me.Name = "Form1"
        Me.Text = "form1"
        Me.ResumeLayout(False)

    End Sub

#End Region



    Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
        MessageBox.Show("User Name = " & txtUsername.Text & ", Password = " & txtPasword.Text)
    End Sub
    Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
        MessageBox.Show("ByeBye")
        Application.Exit()
    End Sub
    Private Sub txtUsername_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUsername.TextChanged
        If txtUsername.Text <> "" And txtPasword.Text <> "" Then
            cmdOK.Enabled = True
        Else
            cmdOK.Enabled = False
        End If
    End Sub
    Private Sub txtPassword_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPasword.TextChanged
        txtUsername_TextChanged(sender, e)
    End Sub
End Class
