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

Recommended Answers

All 3 Replies

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.

what do you mean by

'do initial code

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.