473,378 Members | 1,439 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.

Where is app.path?

Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)

TIRislaa

Nov 20 '05 #1
6 9163
Public Shared AppExe As String = New
System.IO.FileInfo(System.Reflection.Assembly.GetE xecutingAssembly.Location)
..ToString

"Tor Inge Rislaa" <to*************@rislaa.no> wrote in message
news:hW*******************@news4.e.nsc.no...
Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)

TIRislaa

Nov 20 '05 #2
"Tor Inge Rislaa" <to*************@rislaa.no> schrieb
Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)


http://msdn.microsoft.com/library/en...alBasicNET.asp
--
Armin

Nov 20 '05 #3
Hello,

Try,

AppDomain.CurrentDomain.BaseDirectory

Regards,

Morpheu

"Tor Inge Rislaa" <to*************@rislaa.no> escreveu na mensagem
news:hW*******************@news4.e.nsc.no...
Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)

TIRislaa

Nov 20 '05 #4
Jan
Tor,

dim PathWithAppName as string = System.Windows.Forms.Application.StartupPath
dim PathWithoutAppName as string =
System.Windows.Forms.Applications.ExecutablePath

Regards,
Jan

"Jan Engel Ketmig" <je*@eig.dk> wrote in message
news:3f********@news.wineasy.se...
Public Shared AppExe As String = New
System.IO.FileInfo(System.Reflection.Assembly.GetE xecutingAssembly.Location) .ToString

"Tor Inge Rislaa" <to*************@rislaa.no> wrote in message
news:hW*******************@news4.e.nsc.no...
Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)

TIRislaa


Nov 20 '05 #5
System.Windows.Forms.Application.StartupPath
"Tor Inge Rislaa" <to*************@rislaa.no> wrote in message
news:hW*******************@news4.e.nsc.no...
Where is app.path?

In VB 6.0 I could refer to the app.path how is that done in VB.NET

VB 6.0 Code:
Msgbox (app.path)

TIRislaa


Nov 20 '05 #6
* "Tor Inge Rislaa" <to*************@rislaa.no> scripsit:
In VB 6.0 I could refer to the app.path how is that done in VB.NET


\\\
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

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

Similar topics

1
by: Pierre Rouleau | last post by:
I can't remember where/how sys.path is set (aside from the automatically loaded site.py) and i get a strange entry in it. Can anyone remind me where/how to control sys.path on a Win32 machine (i'm...
4
by: Helmut Jarausch | last post by:
Hi, when I say e.g. help('try') in an interactive Python (or idle) session I get Sorry, topic and keyword documentation is not available because the Python HTML documentation files could not...
4
by: Alex | last post by:
Rossum's tutorial states "Actually, modules are searched in the list of directories given by the variable sys.path which is initialized from the directory containing the input script (or the...
3
by: Xiangliang Meng | last post by:
Hi, all. In 1998, I graduated from Computer Science Dept. in a university in China. Since then, I've been using C Language for almost 6 years. Although I'm using C++ in my current job, I'm also...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
0
by: Kevin F | last post by:
I have a code that opens an .imap file in os.path.expanduser. Unfortunately, I am on OS X and have no idea where that directory is. I am wondering how I can change this code to just open the...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
24
by: Paul | last post by:
I am taking over an existing app and having trouble understanding their references. They have encapsulated Pear packages in the directory structure like: /site /site/html/Pear.php...
7
by: dmitrey | last post by:
Hi all, I guess this question was asked many times before, but I don't know keywords for web search. Thank you in advance, D.
2
by: Damodhar | last post by:
HI friends, # any one say where the cookie files are stored and whats the path and whats the extension for the cookie files in php,this is client side variable.can u say the path for cookie ...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.