473,387 Members | 1,597 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,387 software developers and data experts.

Resource Directory VB.NET 2005


I need to access a text document in the folder where my project is stored,
does anyone know how I can tell were the folder is from within a form.

Like me.myDirectory or something like it ?

Dec 30 '06 #1
4 1272
Just Me,

I would create a registry property from that, others will use a config.file

Cor

"Just Me" <news.microsoft.comschreef in bericht
news:%2***************@TK2MSFTNGP04.phx.gbl...
>
I need to access a text document in the folder where my project is stored,
does anyone know how I can tell were the folder is from within a form.

Like me.myDirectory or something like it ?

Dec 30 '06 #2

I just used "../../" in the end. Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uf*************@TK2MSFTNGP06.phx.gbl...
Just Me,

I would create a registry property from that, others will use a
config.file

Cor

"Just Me" <news.microsoft.comschreef in bericht
news:%2***************@TK2MSFTNGP04.phx.gbl...
>>
I need to access a text document in the folder where my project is
stored, does anyone know how I can tell were the folder is from within a
form.

Like me.myDirectory or something like it ?


Dec 30 '06 #3
Hi

If i understnd what you want to find the application path you can use

Dim fullPath As String =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().CodeBase
then where ever the application is installed you will always be ok

Roger

"Just Me" <news.microsoft.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>
I need to access a text document in the folder where my project is stored,
does anyone know how I can tell were the folder is from within a form.

Like me.myDirectory or something like it ?
Dec 31 '06 #4
JustMe,

You can also take a look at Application.StartupPath

Bruce

"Roger Vale" <ro********@btinternet.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Hi

If i understnd what you want to find the application path you can use

Dim fullPath As String =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().CodeBase
then where ever the application is installed you will always be ok

Roger

"Just Me" <news.microsoft.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>>
I need to access a text document in the folder where my project is
stored, does anyone know how I can tell were the folder is from within a
form.

Like me.myDirectory or something like it ?

Dec 31 '06 #5

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

Similar topics

1
by: Scott Smith | last post by:
Several attributes and interface methods I'm using refer to resources (such as strings or icons) by a numeric ID. This was the only way to refer to resources in unmanaged code (C++, for example),...
2
by: steve bull | last post by:
I created an embedded resource by adding a Swatches.xml file to my Solution and then making it an embedded resource in the VS IDE. When I try to open a stream to the resource using...
0
by: Patrick | last post by:
Hi all, I have a very strange problem with my resource files. I have build an applicatie which uses resource files, but for some reason only the default language works as it should. I use the...
2
by: Steve M | last post by:
I am having a really strange problem. I have a site setup in a virtual directory that fails with the error below. It works on other web servers that are network load balanced with this server. I...
13
by: david | last post by:
I can not figure out what is the problem that I can protect ASP.NEt form resource but not some other type of files, for example, images. All my aspx forms located in Demo folder and image files...
3
by: Jules | last post by:
i'm working with translators that just want to translate "web pages" and not deal with resource files. i'd like to have a file structure that looks sort of like this: / <- root directory where...
8
by: Andreas Zita | last post by:
Hi Im creating my first 2.0 site and I cant find the Build Action property? I want to embedd an image-file in my site-assembly but I don't know how? In 1.1 I could set Build Action to Embedded...
1
by: Tom | last post by:
This may seem a little strange, but in all my years of developing Windows Forms apps, I've never really used Resource files; however, I would like to start doing so in order to store icons,...
1
by: vecozo | last post by:
Centralized resource files Hi, We are considering to migrate our custom asp.net localization procedure, to one that stored .Text properties of controls in a SQL database, towards the usage of...
0
by: =?Utf-8?B?UGF1bCBIYWdlcg==?= | last post by:
I've been trying to solve this issue for the better part of a month. My attempts to get an answer on the MSDN groups proved to no avail. Here is the situation/problem. I am migrating an old...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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: 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...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.