About Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I hate to bother you again, but being an upgrader from vb6 to this language, I am having some difficulty.

In my about box, I have a label (lblVersion) that displays the version number.
I tried this:
lblVersion.Text = "Version " & Environment.Version, but it caused an error. How should I do it properly?

Thanks in advance.
 
On a related note. To get the "version" of your app (as opposed to just the
CLR):

lblBuild.Text = "Build " &
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version().ToString

This can be a real bugger to figure out when moving from vb6. :)

PS: always use Option Strict On and it was save you much grief.

Greg
 
Hi Jay,

Most of the good books assume that you are familiar with vb.

Among the better books:
Balena, MS Press, Programming Visual Basic .Net
Troelson, Apress, vb .net and the .net platform
For database programming - Sceppa, ADO .Net, MS Press

HTH,
Bernie Yaeger

Jay Feldman said:
I hate to bother you again, but being an upgrader from vb6 to this
language, I am having some difficulty.
In my about box, I have a label (lblVersion) that displays the version number.
I tried this:
lblVersion.Text = "Version " & Environment.Version, but it caused an
error. How should I do it properly?
Thanks in advance.
--
Jay Feldman
(e-mail address removed)

P.S. Does anyone know any good books for very experienced vb6 programmers
that need to adapt to .NET? I don't want to learn vb.net from the ground up,
since I am already pretty skilled with vb6 (well, I hope that vb6 experience
will help).
 
* "=?Utf-8?B?SmF5IEZlbGRtYW4=?= said:
I hate to bother you again, but being an upgrader from vb6 to this language, I am having some difficulty.

In my about box, I have a label (lblVersion) that displays the version number.
I tried this:
lblVersion.Text = "Version " & Environment.Version, but it caused an error. How should I do it properly?

Try 'Application.ProductVersion.ToString()'.
 
Back
Top