Hi everybody,
I'm having trouble on how to improve my project. I'm making an application that hides a folder visually. I already have the code for my main program but my instructor wants a twist in it. He wants me to add a feature on it that will show if the application was first loaded. Here's the twist:
1.) Upon initialization, a form will pop-up and will tell me that it's the first time it was loaded and will ask for a password for it (the form) to be used on the next loading.
2.) After the pop-up form, it will load the main program and performs its tasks. Then the application terminates.
3.) If ever the application be run again, a password form will show instead of the pop-up form from before. Then if the password matches on the pop-up form, the main application will load.
I'm using this code on my password form:
CODE
Imports System.IO
Public Class password
Dim Pass As String = Environment.CurrentDirectory & "\" & "Password.txt"
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Static Count As Int16 = 0
Dim fileContents As String
fileContents = My.Computer.FileSystem.ReadAllText(PFile)
If fileContents.Trim = TextBox1.Text.Trim Then
Me.DialogResult = System.Windows.Forms.DialogResult.OK
'I remove the long performance operation of the program
MsgBox("Stealth folder is now visible", MsgBoxStyle.Information)
Application.Exit()
Else
MsgBox("Wrong Password")
Count += 1
If Count >= 3 Then
End
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class
Please help me in satisfying that "twist" that was given by my teacher. Thank you very much...