.NET Equiv. of App.Title, App.ExeName, etc 
Author Message
 .NET Equiv. of App.Title, App.ExeName, etc

In VB6 we can do "strVar = App.Title" to grab a desciptive title from the
Project's properties page.  What's the equivalent in vb.net?
Anyone know the equivalent of App.ExeName, App.Path, or App.Major,
App.Minor, App.Build?

I figure it's got something to do with Assembly Attributes, but I can't
figure out how to actually make it work.  I'm looking for a code sample.
Anybody have one?

--
Roger Aikin

(Remove the 'nospamplease.' for real address.)



Sat, 27 Mar 2004 09:30:43 GMT  
 .NET Equiv. of App.Title, App.ExeName, etc
The rough equivalent to App.Title in VB.NET is Application.ProductName
Some other useful methods of the Application object are:
Application.ExecutablePath

Application.ProductVersion

Application.DoEvents (So that's where DoEvents went!)

- Steve Orr


Quote:
> In VB6 we can do "strVar = App.Title" to grab a desciptive title from the
> Project's properties page.  What's the equivalent in vb.net?
> Anyone know the equivalent of App.ExeName, App.Path, or App.Major,
> App.Minor, App.Build?

> I figure it's got something to do with Assembly Attributes, but I can't
> figure out how to actually make it work.  I'm looking for a code sample.
> Anybody have one?

> --
> Roger Aikin

> (Remove the 'nospamplease.' for real address.)



Sat, 27 Mar 2004 16:38:20 GMT  
 .NET Equiv. of App.Title, App.ExeName, etc
App.Title -> System.Reflection.Assembly.GetExecutingAssembly.GetName.Name
App.EXEName -> System.Reflection.Assembly.GetExecutingAssembly.GetName.Name
 (or VB6.GetEXEName in compatibility library)
App.Major ->
System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Major.ToSt
ring
App.Minor ->
System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Minor.ToSt
ring
App.Build ->
System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Build.ToSt
ring

This post is governed by the Conditions of Use and is provided "AS IS" with
no warranties, and confers no rights. You assume all risk for your use. ?
2001 Microsoft Corporation. All rights reserved.
<http://www.microsoft.com/info/terms.htm>

Please do not send email directly to this alias. This is our online account
name for newsgroup participation only.

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

| Newsgroups:
microsoft.public.it.dotnet.beta.vb,microsoft.public.dotnet.languages.vb
| Subject: .NET Equiv. of App.Title, App.ExeName, etc
| Date: Mon, 8 Oct 2001 21:30:43 -0400
| Organization: Posted via Supernews, http://www.supernews.com

| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000

| Lines: 15
| Path:
cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!f
eeder.qis.net!sn-xit-02!sn-post-02!sn-post-01!supernews.com!corp.supernews.c
om!not-for-mail
| Xref: cppssbbsa01.microsoft.com microsoft.public.it.dotnet.beta.vb:113
microsoft.public.dotnet.languages.vb:18914
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| In VB6 we can do "strVar = App.Title" to grab a desciptive title from the
| Project's properties page.  What's the equivalent in vb.net?
| Anyone know the equivalent of App.ExeName, App.Path, or App.Major,
| App.Minor, App.Build?
|
| I figure it's got something to do with Assembly Attributes, but I can't
| figure out how to actually make it work.  I'm looking for a code sample.
| Anybody have one?
|
| --
| Roger Aikin

| (Remove the 'nospamplease.' for real address.)
|
|
|



Mon, 29 Mar 2004 01:27:49 GMT  
 .NET Equiv. of App.Title, App.ExeName, etc
Thanks for this post.  I've been strugling with trying to control and display an application's version number.

I've been trying to use Application.ProductVersion.  I have edited the <Assembly: AssemblyVersion("1.0.*") tag in the AssemblyInfo.vb file but this has no effect on Application.ProductVersion.  However if you change the line in AssemblyInfo to: <Assembly: AssemblyVersionAttribute("1.0.*") it does effect Product Version.  What's that about?

Joe Griffith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 29 Mar 2004 02:08:14 GMT  
 .NET Equiv. of App.Title, App.ExeName, etc
Joe,

Modified <Assembly.AssemblyVersion>  works for me.  ProductVersion should
return the full version number, which includes Major, Minor, Build and
Revision.

Thanks!
Brian

This post is governed by the Conditions of Use and is provided "AS IS" with
no warranties, and confers no rights. You assume all risk for your use. ?
2001 Microsoft Corporation. All rights reserved.
<http://www.microsoft.com/info/terms.htm>

Please do not send email directly to this alias. This is our online account
name for newsgroup participation only.

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


| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: .NET Equiv. of App.Title, App.ExeName, etc
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: quoted-printable

| Newsgroups: microsoft.public.dotnet.languages.vb
| Date: Wed, 10 Oct 2001 11:08:14 -0700
| NNTP-Posting-Host: 63.84.175.221
| Lines: 1        
| Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp05
| Xref: cppssbbsa01.microsoft.com microsoft.public.dotnet.languages.vb:19122
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Thanks for this post.  I've been strugling with trying to control and
display an application's version number.
| I've been trying to use Application.ProductVersion.  I have edited the
<Assembly: AssemblyVersion("1.0.*") tag in the AssemblyInfo.vb file but
this has no effect on Application.ProductVersion.  However if you change
the line in AssemblyInfo to: <Assembly: AssemblyVersionAttribute("1.0.*")
it does effect Product Version.  What's that about?
| Joe Griffith

| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|



Mon, 29 Mar 2004 02:38:12 GMT  
 .NET Equiv. of App.Title, App.ExeName, etc
Works for me now too.  Don't know what I was doing wrong before.

Joe Griffith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 29 Mar 2004 03:12:43 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. .NET Equiv. of App.Title, App.ExeName, etc

2. ASP.NET App v. VB.NET App

3. Conversion of VB.Net App to ASP .Net App

4. App.EXEName?

5. re app.EXEName from a dll?

6. app.EXEName from a dll?

7. where is app.exename config hiding

8. App.ExeName is not what it should be

9. App.EXEName with extension

10. Question about app.exename

11. App.EXEName

12. where is app.exename config hiding

 

 
Powered by phpBB® Forum Software