Hi,

I need to save file to the My Document folder, could someone please
tell me what API to use? Also, if I would like to save to the same
folder as the running app, how do I find the installation folder?

I am coding in C# of VS.NET 2003 .

Thanks,
SKL

Re: How to find "My Document" and the "installation folder" of the app? by Peter

Peter
Wed Mar 15 01:19:57 CST 2006

You can get the exe directory from reflection:-
http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ%2FStartupDirectory

My Documents can be determined by using SHGetSpecialFolderPath, or the
managed implementation in OpenNETCF.EnvironmentEx / Environment2 -
www.opennetcf.org/sdf/
.NETCF v2.0 has this functionality in System.Environment.

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com
"SL" <jsk_lam@hotmail.com> wrote in message
news:%23fHJ0R$RGHA.4740@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I need to save file to the My Document folder, could someone please
> tell me what API to use? Also, if I would like to save to the same
> folder as the running app, how do I find the installation folder?
>
> I am coding in C# of VS.NET 2003 .
>
> Thanks,
> SKL
>
>



Re: How to find "My Document" and the "installation folder" of the app? by SL

SL
Wed Mar 15 07:33:02 CST 2006

My app will support CF v1.x and there is no EnvironmentEx/Environment2.

I tried the example in the StartupDirectory example, it returns the path
"\Windows\GAC_System.Windows.Forms..." instead of the directory of
my application.

What I am intending to do is display the OpenFileDialog and set the
OpenFileDialog.Initial to the "My Documents\Personal" folder.

Thanks
SKL

"Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in message
news:%23X%23JdDASGHA.1844@TK2MSFTNGP12.phx.gbl...
> You can get the exe directory from reflection:-
> http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ%2FStartupDirectory
>
> My Documents can be determined by using SHGetSpecialFolderPath, or the
> managed implementation in OpenNETCF.EnvironmentEx / Environment2 -
> www.opennetcf.org/sdf/
> .NETCF v2.0 has this functionality in System.Environment.
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.peterfoot.net | www.inthehand.com
> "SL" <jsk_lam@hotmail.com> wrote in message
> news:%23fHJ0R$RGHA.4740@TK2MSFTNGP14.phx.gbl...
> > Hi,
> >
> > I need to save file to the My Document folder, could someone please
> > tell me what API to use? Also, if I would like to save to the same
> > folder as the running app, how do I find the installation folder?
> >
> > I am coding in C# of VS.NET 2003 .
> >
> > Thanks,
> > SKL
> >
> >
>
>