Vb 2010 Form help

Discussion in 'Mixed Languages' started by adamrpostjr, Sep 23, 2012.

  1. adamrpostjr

    adamrpostjr MDL Novice

    Sep 23, 2012
    2
    0
    0
    [h=1]Vb 2010 Form help[/h]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. master131

    master131 MDL Novice

    Apr 12, 2011
    45
    22
    0
    #2 master131, Sep 23, 2012
    Last edited by a moderator: Apr 20, 2017
    Use the built in Settings system via the Project Properties. Add some kind of Boolean named Registered and put the default value to false. Then check for something like.

    Code:
    If Not My.Settings.Registered Then
        SomeForm.ShowDialog()
        My.Settings.Registered = True
        My.Settings.Save
    End If
     
  3. adamrpostjr

    adamrpostjr MDL Novice

    Sep 23, 2012
    2
    0
    0
    #3 adamrpostjr, Sep 23, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)

    it didnt work :/

    Code:
      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not My.Settings.FirstRun Then
                Me.ShowDialog()
                My.Settings.FirstRun = True
                My.Settings.Save()
            End If
        End Sub
     
  4. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,515
    7,171
    120
    You need to create a module that write the input data in an XML or Database file every time or every close.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...