0% found this document useful (0 votes)
24 views2 pages

"Admin" "Admin": Private Sub Byval As Byval As Handles If and Then Me True Me True Me True Else

This document contains code for a login form that enables additional menu options if the username and password entered match "Admin". It also contains code to mask the password textbox as asterisks, hide an "Account" form on startup, and show that form when the "EntryPelanggan" menu option is clicked.

Uploaded by

Yuni Nur Arisman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

"Admin" "Admin": Private Sub Byval As Byval As Handles If and Then Me True Me True Me True Else

This document contains code for a login form that enables additional menu options if the username and password entered match "Admin". It also contains code to mask the password textbox as asterisks, hide an "Account" form on startup, and show that form when the "EntryPelanggan" menu option is clicked.

Uploaded by

Yuni Nur Arisman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Private Sub Button1_Click(ByVal sender As System.

Object, ByVal e As
System.EventArgs) Handles Button1.Click
If TextBox1.Text = "Admin" And TextBox2.Text = "Admin" Then
Me.FileToolStripMenuItem.Enabled = True
Me.LaporanToolStripMenuItem.Enabled = True
Me.HelpToolStripMenuItem.Enabled = True

Else
MessageBox.Show(" Username atau Password yang Anda Masukan
Salah", "Pesan", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles TextBox2.TextChanged
TextBox2.PasswordChar = "*"
End Sub

Private Sub Menu_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Account.Hide()
End Sub

Private Sub EntryPelangganToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
EntryPelangganToolStripMenuItem.Click
Account.Show()
End Sub

You might also like