Question: On VB.NET, I have the following code for a password screen that appears when the form loads. How can I make the password be in

On VB.NET, I have the following code for a password screen that appears when the form loads.

How can I make the password be in the following form: MSG-##

The M, S, and G can be lower or upper case and the #'s can be any number

Private Sub MainScreen_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Show password form as dialog box Dim InputPassword As String = "", Count As Integer = 1 Dim GoodWord As String = "MSG" Do While Count <= 3 InputPassword = InputBox("Please enter your password. Case is important", "Employee Aplication System Password Attempt #" & Count) If InputPassword = GoodWord Then MsgBox("Congratulations") Exit Sub End If MsgBox("Sorry, this password is incorrect. Please try again.") Count += 1 Loop MsgBox("Failed password.") End

Dim UserName, SSN As Single UserName = txtFirst.Text + txtLast.Text SSN = txtSSN.Text End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!