Hi,
in VB6 i use App.Path to determine the path my executable run from.
what is the VB.NET / framework replacement fot that?
TIA, z. 16 3283
Application.StartupPath
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
Hi,
in VB6 i use App.Path to determine the path my executable run from.
what is the VB.NET / framework replacement fot that?
TIA, z.
Hi,
Application.StartupPath
--
Happy Coding!
Morten Wennevik [C# MVP]
Application.StartupPath
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl: Hi,
in VB6 i use App.Path to determine the path my executable run from. what is the VB.NET / framework replacement fot that?
TIA, z.
Application.ExecutablePath (with filename) or
Application.StartupPath(without filename). I believe StartupPath directly
corresponds to VB6's App.Path.
hope that helps..
Imran.
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl... Hi,
in VB6 i use App.Path to determine the path my executable run from. what is the VB.NET / framework replacement fot that?
TIA, z.
"z. f." <zi**@info-scopeREMSPAM.co.il> schrieb: in VB6 i use App.Path to determine the path my executable run from. what is the VB.NET / framework replacement fot that?
'Application.StartupPath', or more general (can be used in DLL projects
too):
\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Herfried,
Nice done really an addition.
Cor
are you testing your random word generator application?
On Thu, 14 Oct 2004 17:17:12 +0200, "Cor Ligthert"
<no************@planet.nl> wrote: Herfried,
Nice done really an addition.
Cor
LOL!
"ToddT" <tu********@maritzSPAM.com> wrote in message
news:hp********************************@4ax.com: are you testing your random word generator application?
On Thu, 14 Oct 2004 17:17:12 +0200, "Cor Ligthert" <no************@planet.nl> wrote:
Herfried,
Nice done really an addition.
Cor
Yours is better I saw makes much more words
> Herfried, Nice done really an addition.
Seems that people think this is sarcastic, it is not, we normally see only
the Application.StartupPath I find this a nice addition to that.
Cor
Cor,
"Cor Ligthert" <no************@planet.nl> schrieb: Nice done really an addition. Seems that people think this is sarcastic, it is not, we normally see only the Application.StartupPath I find this a nice addition to that.
:-)
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
What about AppDomain.CurrentDomain.BasePath?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eA**************@TK2MSFTNGP14.phx.gbl... "z. f." <zi**@info-scopeREMSPAM.co.il> schrieb: in VB6 i use App.Path to determine the path my executable run from. what is the VB.NET / framework replacement fot that?
'Application.StartupPath', or more general (can be used in DLL projects too):
\\\ Imports System.IO Imports System.Reflection . . . Private Function ApplicationPath() As String Return _ Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location) End Function ///
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
"Stefan Simek" <si********@kascomp.blah.sk> schrieb: What about AppDomain.CurrentDomain.BasePath?
What if you set up more than one appdomain in your application?
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl... "Stefan Simek" <si********@kascomp.blah.sk> schrieb: What about AppDomain.CurrentDomain.BasePath? What if you set up more than one appdomain in your application?
If you don't I guess it's usable.
If you do, it depends what exactly do you need to use. -- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
if your code is running inside a DLL then code:
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
will not give the same results as
'Application.StartupPath'
since it will return the DLL location while the other will give the
executable location, which i need.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eA**************@TK2MSFTNGP14.phx.gbl... "z. f." <zi**@info-scopeREMSPAM.co.il> schrieb: in VB6 i use App.Path to determine the path my executable run from. what is the VB.NET / framework replacement fot that?
'Application.StartupPath', or more general (can be used in DLL projects too):
\\\ Imports System.IO Imports System.Reflection . . . Private Function ApplicationPath() As String Return _ Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location) End Function ///
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Then replace GetExecutingAssembly() with GetEntryAssembly() ;)
HTH,
Stefan
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:us****************@TK2MSFTNGP10.phx.gbl... if your code is running inside a DLL then code: Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location) will not give the same results as 'Application.StartupPath' since it will return the DLL location while the other will give the executable location, which i need.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message news:eA**************@TK2MSFTNGP14.phx.gbl... "z. f." <zi**@info-scopeREMSPAM.co.il> schrieb: > in VB6 i use App.Path to determine the path my executable run from. > what is the VB.NET / framework replacement fot that?
'Application.StartupPath', or more general (can be used in DLL projects too):
\\\ Imports System.IO Imports System.Reflection . . . Private Function ApplicationPath() As String Return _ Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location) End Function ///
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kerberos |
last post by:
I followed Dan Cederholm's image replacement tutorial, to replace a header
tag by a logo. The h1 is clickable if no CSS is applied but it I replace
it by the logo, the area isn't clickable anymore...
|
by: Vibha Tripathi |
last post by:
Hi Folks,
I put a Regular Expression question on this list a
couple days ago. I would like to rephrase my question
as below:
In the Python re.sub(regex, replacement, subject)...
|
by: Michael Hoffman |
last post by:
Many of you are familiar with Jason Orendorff's path module
<http://www.jorendorff.com/articles/python/path/>, which is frequently
recommended here on c.l.p. I submitted an RFE to add it to the...
|
by: Reinhold Birkenfeld |
last post by:
Hi,
the arguments in the previous thread were convincing enough, so I made the
Path class inherit from str/unicode again.
It still can be found in CVS:...
|
by: Paul D. Boyle |
last post by:
Hi all,
There was a recent thread in this group which talked about the
shortcomings of fgets(). I decided to try my hand at writing a
replacement for fgets() using fgetc() and realloc() to read...
|
by: Dave |
last post by:
I have two environments: DEV and PROD. In DEV I have two independent webs.
In PROD one of the webs is the root and the other is a subweb of the root.
Each enviornment has a different file system...
|
by: André |
last post by:
I'm attempting to override a wxHtmlWindow method in order to
pre-process the file before displaying it. I'm using a unicode version
of wxPython. I don't think my problem are wxPython-specific, but...
|
by: lawrence k |
last post by:
Want to replace the limit clause in a query, but can't get it right.
What's wrong with this:
$pattern = "(.*)limit (.*)";
$replacement = '$1';
$replacement .= "LIMIT $limit";
$replacement .=...
|
by: ApexData |
last post by:
Hello
I currently Link the FE/BE using the LinkTables Option and the Linked
Table Manager. Any time I need to move the BE to another location, I
have to go through this process over again. I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |