|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I know my application's path?Hello everyone:
for example, if my application is in "c:\" , I want the app could know that and tell me , then I close it and move it to "d:\" , when I run it again, it could know where it is now. How can I get this infomation? Thanks so much! In VB6 you would simply reference App.Path; in VB.Net I'm guessing the App
object still exists - look in the VB Compatibility namespace... Chris Show quoteHide quote "Moosdau" <moos***@gmail.com> wrote in message news:1144479006.566237.118610@v46g2000cwv.googlegroups.com... > Hello everyone: > > for example, if my application is in "c:\" , I want the app could > know that and tell me , then I close it and move it to "d:\" , when I > run it again, it could know where it is now. > > How can I get this infomation? > Thanks so much! > Hi Moosdau,
We did not see him a long time. It was a while almost daily asked. http://msdn2.microsoft.com/en-us/library/system.windows.forms.application.startuppath(VS.80).aspx I hope this helps, Cor Show quoteHide quote "Moosdau" <moos***@gmail.com> schreef in bericht news:1144479006.566237.118610@v46g2000cwv.googlegroups.com... > Hello everyone: > > for example, if my application is in "c:\" , I want the app could > know that and tell me , then I close it and move it to "d:\" , when I > run it again, it could know where it is now. > > How can I get this infomation? > Thanks so much! > Thanks very much for your help (and so quickly..)!!!
I've tried to search for hours , but I still can't find it. system.windows.forms I will remember this namespace -- ^_^ Thanks again!! Public G_ApplicationDirectory As String =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location) Moosdau ha scritto: Show quoteHide quote > Thanks very much for your help (and so quickly..)!!! > > I've tried to search for hours , but I still can't find it. > > system.windows.forms > I will remember this namespace -- ^_^ > > Thanks again!! "Moosdau" <moos***@gmail.com> schrieb: Check out the code snippet at > for example, if my application is in "c:\" , I want the app could > know that and tell me , then I close it and move it to "d:\" , when I > run it again, it could know where it is now. <URL:http://dotnet.mvps.org/dotnet/code/application/#ApplicationPath>. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Save graphics image to bitmap?
Applications sharing Forms Authentication VB2005 -> OLEDB Connectivity question OptionExplicit programm crashs when instancing new object Retrieveing full Username from Enviroment? decimal serious problem How do I get a gradualy changing colors? Form fade in Command line parameters |
|||||||||||||||||||||||