Home All Groups Group Topic Archive Search About

how to get a file to display from relative filespec

Author
6 Sep 2006 6:22 AM
GS
I have in the project directory an html file that I want my solution to
display. what how can I specify it in a hosted web browser? How would I
specify the file spec for the html without absolute path?

In c I could use getmoduleFileName to find out the directory for the module
and from there I can use relative path. In Java, I can use some resource
function.


I tried searching the built-in help for vb.net 2005 express, but no luck,
search on the web, so far I have not found something relevant yet.


Please help

Thank you for your effort and time.

Author
6 Sep 2006 8:55 AM
Robinson
Show quote Hide quote
"GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> wrote in message
news:eH6dNzX0GHA.344@TK2MSFTNGP05.phx.gbl...
>I have in the project directory an html file that I want my solution to
> display. what how can I specify it in a hosted web browser? How would I
> specify the file spec for the html without absolute path?
>
> In c I could use getmoduleFileName to find out the directory for the
> module
> and from there I can use relative path. In Java, I can use some resource
> function.
>
>
> I tried searching the built-in help for vb.net 2005 express, but no luck,
> search on the web, so far I have not found something relevant yet.
>
>
> Please help
>
> Thank you for your effort and time.
>
>


Application.ExecutablePath will return the path your program is running
from.  If its always relative to that, then you can use it to construct a
full path.
Author
6 Sep 2006 4:09 PM
GS
fantastic! Thank you very much, Robinson.

Show quoteHide quote
"Robinson" <b**@bbb.com> wrote in message
news:l_qdnWgY9MVmEWPZnZ2dnUVZ8t2dnZ2d@giganews.com...
>
> "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> wrote in message
> news:eH6dNzX0GHA.344@TK2MSFTNGP05.phx.gbl...
> >I have in the project directory an html file that I want my solution to
> > display. what how can I specify it in a hosted web browser? How would I
> > specify the file spec for the html without absolute path?
> >
> > In c I could use getmoduleFileName to find out the directory for the
> > module
> > and from there I can use relative path. In Java, I can use some resource
> > function.
> >
> >
> > I tried searching the built-in help for vb.net 2005 express, but no
luck,
> > search on the web, so far I have not found something relevant yet.
> >
> >
> > Please help
> >
> > Thank you for your effort and time.
> >
> >
>
>
> Application.ExecutablePath will return the path your program is running
> from.  If its always relative to that, then you can use it to construct a
> full path.
>
>
Author
7 Sep 2006 9:01 AM
GhostInAK
Hello gs,

..ExecutablePath returns the full path to the currently running instance.
You will probably want .StartupPath

-Boo

Show quoteHide quote
> fantastic! Thank you very much, Robinson.
>
> "Robinson" <b**@bbb.com> wrote in message
> news:l_qdnWgY9MVmEWPZnZ2dnUVZ8t2dnZ2d@giganews.com...
>> "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> wrote in message
>> news:eH6dNzX0GHA.344@TK2MSFTNGP05.phx.gbl...
>>
>>> I have in the project directory an html file that I want my solution
>>> to display. what how can I specify it in a hosted web browser? How
>>> would I specify the file spec for the html without absolute path?
>>>
>>> In c I could use getmoduleFileName to find out the directory for the
>>> module
>>> and from there I can use relative path. In Java, I can use some
>>> resource
>>> function.
>>> I tried searching the built-in help for vb.net 2005 express, but no
>>>
> luck,
>
>>> search on the web, so far I have not found something relevant yet.
>>>
>>> Please help
>>>
>>> Thank you for your effort and time.
>>>
>> Application.ExecutablePath will return the path your program is
>> running from.  If its always relative to that, then you can use it to
>> construct a full path.
>>
Author
7 Sep 2006 5:00 PM
GS
thank you, "GhostInAK". Definitely StartPath is the way to go for my
purpose - it got rid of 2 lines of codes..

Show quoteHide quote
"GhostInAK" <ghosti***@gmail.com> wrote in message
news:c71747b42f0e18c8a0303a545296@news.microsoft.com...
> Hello gs,
>
> .ExecutablePath returns the full path to the currently running instance.
>  You will probably want .StartupPath
>
> -Boo
>
> > fantastic! Thank you very much, Robinson.
> >
> > "Robinson" <b**@bbb.com> wrote in message
> > news:l_qdnWgY9MVmEWPZnZ2dnUVZ8t2dnZ2d@giganews.com...
> >> "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> wrote in message
> >> news:eH6dNzX0GHA.344@TK2MSFTNGP05.phx.gbl...
> >>
> >>> I have in the project directory an html file that I want my solution
> >>> to display. what how can I specify it in a hosted web browser? How
> >>> would I specify the file spec for the html without absolute path?
> >>>
> >>> In c I could use getmoduleFileName to find out the directory for the
> >>> module
> >>> and from there I can use relative path. In Java, I can use some
> >>> resource
> >>> function.
> >>> I tried searching the built-in help for vb.net 2005 express, but no
> >>>
> > luck,
> >
> >>> search on the web, so far I have not found something relevant yet.
> >>>
> >>> Please help
> >>>
> >>> Thank you for your effort and time.
> >>>
> >> Application.ExecutablePath will return the path your program is
> >> running from.  If its always relative to that, then you can use it to
> >> construct a full path.
> >>
>
>
>