App.path in vb6 what in .Net?

Hi
I need to get my applicationdll startup directory in vb 6 i use app.path but in .Net i don't know...

I try to use:
IO.Directory.GetCurrentDirectory
but it change every time you open a OpenFileDialog.

Comments

  • : Hi
    : I need to get my applicationdll startup directory in vb 6 i use app.path but in .Net i don't know...
    :
    : I try to use:
    : IO.Directory.GetCurrentDirectory
    : but it change every time you open a OpenFileDialog.
    :

    Here's a link to the differences in the vb6 app object and the new way of doing it in .Net.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vxconchangestoappobjectinvisualbasicnet.asp

    -James
  • Hi
    Application.startuppath will return the path where the app is saved.
    kv
    : : Hi
    : : I need to get my applicationdll startup directory in vb 6 i use app.path but in .Net i don't know...
    : :
    : : I try to use:
    : : IO.Directory.GetCurrentDirectory
    : : but it change every time you open a OpenFileDialog.
    : :
    :
    : Here's a link to the differences in the vb6 app object and the new way of doing it in .Net.
    : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vxconchangestoappobjectinvisualbasicnet.asp
    :
    : -James
    :

  • Hello,

    In your client application you can use application.ExecutablePath to get the desired result (not applicable in dll projects because they do not have an startup object)

    Regards,
    VInod Gupta



    : Hi
    : I need to get my applicationdll startup directory in vb 6 i use app.path but in .Net i don't know...
    :
    : I try to use:
    : IO.Directory.GetCurrentDirectory
    : but it change every time you open a OpenFileDialog.
    :



  • just try at your end.to load icon to form.

    in the form load event

    dim sAppPath as string

    sAppPath = Application.startuppath

    dim ico as new icon(sAppPath + "SAXfore.ico")

    me.icon = ico

    just to test the application path in vb.net

    hope this is of some help to u.


    bye
    shawlin







    : Hi
    : Application.startuppath will return the path where the app is saved.
    : kv
    : : : Hi
    : : : I need to get my applicationdll startup directory in vb 6 i use app.path but in .Net i don't know...
    : : :
    : : : I try to use:
    : : : IO.Directory.GetCurrentDirectory
    : : : but it change every time you open a OpenFileDialog.
    : : :
    : :
    : : Here's a link to the differences in the vb6 app object and the new way of doing it in .Net.
    : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vxconchangestoappobjectinvisualbasicnet.asp
    : :
    : : -James
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories