IO.File.WriteAllText(filePath, My.Resources.MyFile) Proved as works. 19/09/18 K.Sp
Category: Programming
Programming – will have sub cats
Change the Application Name of a VB.net solution
Project1 = existing projects names
Project2 = new name
Rename the Project1 folder where the .sln file resides.
Open the .sln in Nodepad++ and rename all project names instances from Project1 to project2
Rename the Project1.vbproj to Project2.vbproj
Open the .sln in Visual Studio and right click on Solution Properties in Solution Explorer
Change Assembly Name & Root Namespace to the new Projects name.
Upon building VB Designer will complain, as old Project1 name will still be referenced. Do a Search/Replace for Project1 to Project2 throughout the Entire Solution.
Should be ok to do Build – Clean then Rebuild.
Check in appro. Bin folder for build type that the .exe name is correct.
VB Snippet – Keep a MessageBox() OnTop
‘ MessageBoxOptions.ServiceNotification is the key to doing it
Dim result As DialogResult = MessageBox.Show(“The Previously Calibrated Value Is: ” & PreviouslyCalibratedValue & vbCrLf & “Do you want to overwrite?”, “Overwrite Confirm”, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
If result = DialogResult.Yes Then ‘ is ok to overwrite the existing calibration value in the file
IsOKToOverwrite = True
Else
IsOKToOverwrite = False
End If