473,779 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Version number display in About screen

Hello

I would like to display the Version number of my application in the
About screen. I manually set this value in the Properties of my
deployment project. How can this value be accessed at runtime?

Thanks for any help!
Nov 20 '05 #1
3 1740
If you specify it in the assemblyinfo, you can get to it like this (just one
example, it can get much more complex)
System.Diagnost ics.FileVersion Info.GetVersion Info(System.Ref lection.Assembl y
..GetExecutingA ssembly.Locatio n).FileMajorPar t.ToString

"dave" <th*****@mailci ty.com> wrote in message
news:f9******** *************** ***@posting.goo gle.com...
Hello

I would like to display the Version number of my application in the
About screen. I manually set this value in the Properties of my
deployment project. How can this value be accessed at runtime?

Thanks for any help!

Nov 20 '05 #2
Dave,

I'm not sure about getting it when you set the version in your deployment
project, but this is how I get it if I set it in the <AssemblyVersio n>
attribute in the AssemblyInfo file in the project:

-------------------------------
Imports System.Reflecti on
.......

With [Assembly].GetEntryAssemb ly.GetName
lblVersion.Text = "Version: " & .Version.ToStri ng(2) & " (Build " &
..Version.Build .ToString & ")"
End With

-------------------------------

The above example gets the version of the *entry* assembly (the main program
that started your code).

HTH,

Trev.

"dave" <th*****@mailci ty.com> wrote in message
news:f9******** *************** ***@posting.goo gle.com...
Hello

I would like to display the Version number of my application in the
About screen. I manually set this value in the Properties of my
deployment project. How can this value be accessed at runtime?

Thanks for any help!

Nov 20 '05 #3
I, too, am not sure how to get it if you set it in your deployment project, but if you set it in the AssemblyInfo.vb file (and if you are retrieving the version of the main running application), then there's a much easier way to do it than some other people have informed you. As long as you are getting the version of the assembly that is loaded by default when you open the executable (and not an assembly that is, say, loaded into the AppDomain after the fact, or an assembly being used as a resource), then you can simply use the Application.Pro ductVersion string object

That's how I usually do it

Ben
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6173
by: Shufen | last post by:
Hi, I'm a newbie that just started to learn python, html and etc. I have some questions to ask and hope that someone can help me on. I'm trying to code a python script (with HTML) to get values from a html form that consists of about 10 checkbox and a textbox where user have to key in a value to perform a search. From python tutors, I learned that I have to use the following method:
133
13277
by: Jane Withnolastname | last post by:
I have a web page that uses an unordered list (<UL>) and the LH (list header) tag. I know LH is a valid tag because it is clearly defined by the W3C here: http://www.w3.org/MarkUp/html3/bulletlists.html The problem is, when I try to validate the page at W3C, it tells me: " element "LH" undefined " My page is 4.01 Transitional, using charset windows-1252. Any ideas why this won't validate?
2
3501
by: Cary | last post by:
In my project, I want to display the version number on the splash screen and in the help section of my application. I have a variable I created called appVersion. When I go to my deployment project properties, the Version number is there. Is there a line of code that I can use where I can assign the version number to the appVersion variable, something like "appVersion=system.deploymentapp.properties.version" but that actually works? Many...
3
1013
by: Geoff | last post by:
Hi Can anybody help me with the following problem? I have a vb.net application which has a setup project. In the setup I can specify the version number of the application. I would like to display this version number in the splash screen of the main application. Is there a way to do this? Geoff
5
15506
by: Lyners | last post by:
I have a VB.NET application that is deployed to an end user. I would like to display on screen the application version of the application so that I know the end user id using the latest version of our software. How do you access the property of the application version?
89
3912
by: Randy Webb | last post by:
There is an updated version of the FAQ at: <URL: http://jibbering.com/faq/newfaq/> The changes/modifications to date are: 2.3 Corrected "span" to "spam". 2.3 Updated with a note about not posting copyrighted material. 2.3 Removed paragraph about Google Groups. 2.3 Para 5 Added note about code being executable as transmitted. 2.4 Made an LI list of the answers.
2
6913
by: Zim Babwe | last post by:
I posted in another group but thought this was the better place to post, since it had to do with the vb language I have been making changes to my Windows Application and in the Project/Properties the Publish Version shows the following: Major: 1 Minor: 0 Build: 0 Revision: 45
2
3701
by: Vayse | last post by:
On my Help/About screen, I'd like to display 1) The version number, as it appears in the Publish screen. 2) The version number of the Report Viewer control. How would I do this? Thanks Vayse
9
7644
by: Zim Babwe | last post by:
Doesn't anyone display the version and revision number in their VB.NET application on the "about" screen or somewhere else? I need to know how to display that information also. Any help would be appreciated
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.