473,378 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

About Box

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
Ja********@NOSPAMmonmouth.com

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).
Nov 20 '05 #1
4 2304
Hi,

Try Environment.Version.ToString

Ken
----------------

"Jay Feldman" <Ja********@NOSPAMmonmouth.com> wrote in message
news:0F**********************************@microsof t.com:
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.


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004
Nov 20 '05 #2
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

"Jay Feldman" <Ja********@NOSPAMmonmouth.com> wrote in message
news:0F**********************************@microsof t.com...
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
Ja********@NOSPAMmonmouth.com

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).

Nov 20 '05 #3
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" <Ja********@NOSPAMmonmouth.com> wrote in message
news:0F**********************************@microsof t.com...
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
Ja********@NOSPAMmonmouth.com

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).
Nov 20 '05 #4
* "=?Utf-8?B?SmF5IEZlbGRtYW4=?=" <Ja********@NOSPAMmonmouth.com> scripsit:
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()'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5

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

Similar topics

1
by: eScrewDotCom | last post by:
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
8
by: eScrewDotCom | last post by:
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew...
77
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
5
by: eScrewDotCom | last post by:
www.eScrew.com eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is...
81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
0
by: eScrewDotCom | last post by:
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew...
7
by: Edward Yang | last post by:
A few days ago I started a thread "I think C# is forcing us to write more (redundant) code" and got many replies (more than what I had expected). But after reading all the replies I think my...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.