[VB2008] Import My.Settings from previous build version
I am using this in Visual Basic 2008 Express Edition but it may work in other versions.
The following will allow you to automatically import your settings from a previous build version of an application.
Firstly go to Project Properties and click on the Settings tab.
Next add a new setting with the following parameters:
Name: IUpgraded
Type: Boolean
Scope: User
Value: False
In the form_load event of your startup form (not the splashscreen if you're using one) add the following code before any other code:
Code:
If Not My.Settings.lUpgraded Then
My.Settings.Upgrade()
My.Settings.lUpgraded = 1
MsgBox("Your settings have been imported from the previous build version.", MsgBoxStyle.Information, "Upgrade Complete")
End If
This works by copying your settings from the previous build then changing the value of the IUpgraded setting from False to True.
Re: [VB2008] Import My.Settings from previous build version
Thanks, never knew that.
Works perfectly in VB2008