Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / April 2006

Tip: Looking for answers? Try searching our database.

How to use SaveFileDialog?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 25 Apr 2006 23:55 GMT
Hi, I have recently installed Visual Studio 2005 and although I'm starting to
understand the 64 bit differences, I seem to have run into another problem.

I would like to implement a simple "Save As.." dialog box, which back in the
day I remember was extremely simple, but now I can't find how I wrote the
code back then, and I don't understand how to use the .NET component
"SaveFileDialog".

In the help files it says that in order to use SaveFileDialog, one must use:
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
But I can't find how to manke use of those.

Could someone please point me in the direction of how to implement a "Save
As.." dialog?

Thank you.
mccoyn - 26 Apr 2006 16:58 GMT
There are some project settings you have to set up before you can use .Net.  
If you created a new .Net project this is all done for you.  If not, read on.

First you have to make sure you have the project set to use managed
extensions.  This is in the General category in the project properties
dialog.  After that you need to make sure you have a reference to the
assembly you need.  Right click on the project name in solution explorer and
select Add Reference.  This will bring up a dialog.  Find the
System.Windows.Forms assembly and add it.

Now, in your source code you want to use the namespace, so near the top put
this:
using namespace System::Windows::Forms;

Now you should be all set to do the example found on MSDN
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformssavefi
ledialogclasstopic.asp


As an alternative to the adding a reference thing you can use the following
line with your include files:
#using <System.Windows.Forms.dll>

> Hi, I have recently installed Visual Studio 2005 and although I'm starting to
> understand the 64 bit differences, I seem to have run into another problem.
[quoted text clipped - 13 lines]
>
> Thank you.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.