Windows Develop Bookmark and Share   
 index > Windows Forms General > showing publish version/date on form
 

showing publish version/date on form

in vb6 i used to show the version and date in the caption bar like this

strVer = "VERSION NUMBER:" & " " & App.Major & "." & App.Minor & "." & App.Revision & " " & App.Comments

Me.Caption = Me.Caption & " (" & gtStation & ")" & " " & (gtArea) & " " & (gtLine) & " " & strVer

How do I do this in vb.net 2005

Ljhopkins  Monday, July 09, 2007 8:19 PM
Not sure how you missed the Application.ProductVersion property. It returns the version as set by Project + Properties, Application tab, Assembly Information button, "File Version". Application.ProductName is set by "Product" in the same property sheet.
nobugz  Monday, July 09, 2007 9:50 PM
Take a look at the System.Windows.Forms.Application class...

eperales  Monday, July 09, 2007 8:33 PM
Ljhopkins  Monday, July 09, 2007 9:03 PM

Code Snippet

strVer = String.Format("Version Number: {0}", System.Windows.Forms.Application.ProductVersion)

Christopher Payne  Monday, July 09, 2007 9:47 PM
Not sure how you missed the Application.ProductVersion property. It returns the version as set by Project + Properties, Application tab, Assembly Information button, "File Version". Application.ProductName is set by "Product" in the same property sheet.
nobugz  Monday, July 09, 2007 9:50 PM

You can use google to search for other answers

Custom Search

More Threads

• Windows Forms tip: use Spy++!
• load progress bar
• c# Insert Text into Textbox
• Tabcontrol and pages
• bug in DirectoryInfo.GetFiles()
• Dockable window with a Pin... How?
• Windows Main UI becomes unresponsive while running backgroundworker
• How to turn on the grid in the form designer?
• align columnheader`s text - how to?
• Ctrl-c or Ctrl-x does not work in DataGridView.