Create Login Form POS Application

3:34:00 AM
This is Step-5 how to build POS (Point Of Sale) Application using VB NET 2013

Step-1 : Create New Project POS Application Using VB Net 2013
Step-2 : Create Main Menu POS Application VB NET 2013 
Step-3 : Create Database and Table POS Application 
Step-4 : Create Database Connection Use Module VB NET 2013

Follow below steps to Create Form Login POS Application
Open Project POS Application before
Click - Project - Add Windows Form...
And then follow like below picture
Click Add
Design LoginForm.vb like below picture
Place below code at MainMenuForm

Public Class MainMenuForm
    Sub LockMenu()
        LoginToolStripMenuItem.Enabled = True
        LogoutToolStripMenuItem.Enabled = False
        MasterToolStripMenuItem.Enabled = False
        TransactionToolStripMenuItem.Enabled = False
        ReportToolStripMenuItem.Enabled = False
        UtilityToolStripMenuItem.Enabled = False
    End Sub
    Private Sub MainMenuForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Call LockMenu()
    End Sub

    Private Sub LoginToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LoginToolStripMenuItem.Click
        LoginForm.ShowDialog()
    End Sub

    Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
        End
    End Sub
End Class
Place below code at LoginForm
Imports System.Data.OleDb
Public Class LoginForm
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If e.KeyChar = Chr(13) Then TextBox2.Focus()
    End Sub
    Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
        If e.KeyChar = Chr(13) Then Button1.Focus()
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Or TextBox2.Text = "" Then
            MsgBox("Please fill form")
            Exit Sub
        Else
            Call OpenDB()
            CMD = New OleDbCommand("select * from TBL_USER where USER_ID='" & TextBox1.Text & "' and USER_PASSWORD='" & TextBox2.Text & "'", CONN)
            RD = CMD.ExecuteReader
            RD.Read()
            If RD.HasRows Then
                Me.Close()
                MainMenuForm.Show()
                MainMenuForm.LoginToolStripMenuItem.Enabled = False
                MainMenuForm.LogoutToolStripMenuItem.Enabled = True
                MainMenuForm.MasterToolStripMenuItem.Enabled = True
                MainMenuForm.TransactionToolStripMenuItem.Enabled = True
                MainMenuForm.ReportToolStripMenuItem.Enabled = True
                MainMenuForm.UtilityToolStripMenuItem.Enabled = True
            Else
                MsgBox("User id or Password is Incorrect")
            End If
        End If
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub
    Private Sub FormLogin_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        TextBox1.Focus()
    End Sub
    Private Sub FormLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.MaxLength = 6
        TextBox2.PasswordChar = "X"
        TextBox1.Clear()
        TextBox2.Clear()
    End Sub
End Class
And then you can Run or start your POS Application
CLICK HERE to download source code project for step above
Please following Step-6 to continue build POS Application using VB NET 2013

Artikel Terkait

Next Article
« Prev Post
Previous Article
Next Post »
Penulisan markup di komentar
  • Untuk menulis huruf bold silahkan gunakan <strong></strong> atau <b></b>.
  • Untuk menulis huruf italic silahkan gunakan <em></em> atau <i></i>.
  • Untuk menulis huruf underline silahkan gunakan <u></u>.
  • Untuk menulis huruf strikethrought silahkan gunakan <strike></strike>.
  • Untuk menulis kode HTML silahkan gunakan <code></code> atau <pre></pre> atau <pre><code></code></pre>, dan silahkan parse dulu kodenya pada kotak parser di bawah ini.
Konversi Code
Disqus
Silahkan Berkomentar Dengan