Project Help on How to do this:

I need help on figuring out how to do this kind of project

Page 1 of 1

2 Replies - 1360 Views - Last Post: 13 October 2008 - 09:46 AM Rate Topic: -----

#1 kalabidong  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 23-August 08

Project Help on How to do this:

Posted 13 October 2008 - 08:59 AM

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:

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...

Is This A Good Question/Topic? 0
  • +

Replies To: Project Help on How to do this:

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: Project Help on How to do this:

Posted 13 October 2008 - 09:13 AM

Use the Settings in Projects Properties, to setup a setting called AlreadyRun (a boolean).
Then use something like this in app's load event.
  If My.Settings.AlreadyRun Then
   ' The App has already been run.
  Else
   ' App's first run

My.Settings.AlreadyRun = True
My.Settings.Save()



  End If


Was This Post Helpful? 0
  • +
  • -

#3 kalabidong  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 23-August 08

Re: Project Help on How to do this:

Posted 13 October 2008 - 09:46 AM

View PostAdamSpeight2008, on 13 Oct, 2008 - 09:13 AM, said:

Use the Settings in Projects Properties, to setup a setting called AlreadyRun (a boolean).
Then use something like this in app's load event.
  If My.Settings.AlreadyRun Then
   ' The App has already been run.
  Else
   ' App's first run

My.Settings.AlreadyRun = True
My.Settings.Save()



  End If



cool... thank you very much for your help.. its working.. :bananaman: :tup: i'm soooooo noob.... :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1