473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# equivelent of VB 6 App.Path

I am looking to show the build information of an
application built in .Net C#. Back in the VB 6 days, I
was able to use the app.path property.

Does anyone know of an equivelant command in C#?

Gary
Nov 15 '05 #1
4 39240
I am looking to show the build information of an
application built in .Net C#. Back in the VB 6 days, I
was able to use the app.path property.

Does anyone know of an equivelant command in C#?

Gary


Hi,

try the System.Windows.Forms.Application class

VB6 app.path would be Application.StartupPath I suppose (don't know VB6 to
well.... :)

Ulf
Nov 15 '05 #2
Try Application.StartupPath

-----Original Message-----
I am looking to show the build information of an
application built in .Net C#. Back in the VB 6 days, I
was able to use the app.path property.

Does anyone know of an equivelant command in C#?

Gary
.

Nov 15 '05 #3
Gary,
I am looking to show the build information of an
application built in .Net C#. Back in the VB 6 days, I
was able to use the app.path property.

Does anyone know of an equivelant command in C#?


Check out

http://www.fawcette.com/vsm/2002_10/...s/qa/page4.asp

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #4
Bill, I think this is what you need

string stAppPath1;

stAppPath1 = Environment.CurrentDirectory;

Rich

"Bill Birt" <bi********@hotmail.com> wrote in message
news:01****************************@phx.gbl...
Gary,

I am an OLD VB programmer as well and find the .Net
framework changes the simple things we take for granted
in VB. Look at the Application class as it has several
methods that point to what the old App.Path property
pointed to.

Hope this example helps.

string path = Application.UserAppDataPath;

Regards,

Bill
-----Original Message-----
Try Application.StartupPath

-----Original Message-----
I am looking to show the build information of an
application built in .Net C#. Back in the VB 6 days, I
was able to use the app.path property.

Does anyone know of an equivelant command in C#?

Gary
.

.

Nov 15 '05 #5

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

Similar topics

3
9490
by: Chris LaJoie | last post by:
I'm looking for the framework equivilent of either the ShellExec or WinExec API. Preferably ShellExec because I can use it to launch the default browser as well as launch executables. thanks.
7
22054
by: Poewood | last post by:
I store all my global functions in modules when using vb. What is the equivelent convention in C#. I am converting a .net compact frmwk project from vb to C#. Thanx, Poe
8
8475
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
3
1525
by: rss | last post by:
set rowcount 1 select Idnum1,Idnum3 from mytable order by Idnum1 DESC, idnum3 ASC is equivelent to select first(Idnum1),first(idnum3) from mytable order by first(Idnum1) DESC...
10
1820
by: Dave Cox | last post by:
of "int" in VB? //b=1.2 b=int(b) //b now equals 1
7
6273
by: lathamik | last post by:
Does anyone know of the vb.net equivelent to the c# continue so I can exit the immediate iteration of a for loop and continue with the next one.
23
1686
by: pirata | last post by:
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing?
21
2508
by: Mike N. | last post by:
Can someone tell me if there is a C# equivelent to the VBA 'with' statement that works like this: Set myControl = CommandBars(PopUpToUse).Controls.Add(msoControlButton, before:=5) With...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
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...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7093
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...
0
7517
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...
0
5676
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,...
1
5077
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...
0
1583
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 ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.