Last active
August 29, 2015 14:14
-
-
Save goliver79/9736947355105c36d26f to your computer and use it in GitHub Desktop.
[VB .NET] Display Current Version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Private Sub showCurrentVersion(lbl As Label) | |
| Dim ver As String = "" | |
| Try | |
| ' the application is installed using ClickOnce | |
| ver = My.Application.Deployment.CurrentVersion.ToString | |
| Catch ex As Exception | |
| ' the application is not installed | |
| ver = My.Application.Info.Version.ToString | |
| End Try | |
| lbl.Text = ver | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment