We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,188 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Vb 2010 Form help

Alright so im creating a visual os in vb 2010 and im creating a resgistration form.. the problem is i only want the registration form to only show the first time that they start the program and not everysingle time they open the program.. and i also want the for to remeber eveything they have inputted into the registration form so it can be used later in the program at some point

2
Contributors
3
Replies
11 Hours
Discussion Span
7 Months Ago
Last Updated
4
Views
adamrpostjr
Newbie Poster
2 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

You can use My.Settings.Go to the project properties page then select the "Settings" section (sixth one down the left side). There you can add a settings variable of any type. Pick a name (like FisrtRun) and a type (like Boolean) and set the initial value to True. In your code you can do

If My.Settings.FirstRun Then
    'do initial code
    My.Settings.FirstRun = False
End If

Make sure you select User scope so each user gets their own settings value.

Reverend Jim
Carpe per diem
Moderator
3,604 posts since Aug 2010
Reputation Points: 561
Solved Threads: 448
Skill Endorsements: 32

what do you mean by

'do initial code

adamrpostjr
Newbie Poster
2 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Whatever you were going to do the first time the users runs the app is what you will put there.

Reverend Jim
Carpe per diem
Moderator
3,604 posts since Aug 2010
Reputation Points: 561
Solved Threads: 448
Skill Endorsements: 32

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0790 seconds using 2.67MB