-
Windows Recent Documents folder
I'm working on an MDI app that will open/create/save a lot of files. How do I prevent these files from being added to
the Recent Documents folder? Everything that I've read/found on this subject relates to ensuring that a file gets added.
I've tried direct file manipulation [Open "TESTFILE" For Output As #1, Close #1], and saving rich textbox contents
[rtbText.SaveFile], but Windows insists on adding the new file to the Recent files folder.
--
Kent
rkcripps@softhome.net
-
Re: Windows Recent Documents folder
Kent,
>I'm working on an MDI app that will open/create/save a lot of files. How do I prevent these files from being added to
>the Recent Documents folder? Everything that I've read/found on this subject relates to ensuring that a file gets added.
Are you using a Common Dialog to pick the file to open/save? I think
that's what adds the document to the Recent folder, not your VB code.
If that's it, one workaround, at least for Windows 2000, is to use the
GetOpenFileName API to show the dialog, and include the
OFN_DONTADDTORECENT flag.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
CodeHound - Free VB Search Engine
http://www.codehound.com
-
Re: Windows Recent Documents folder
Kent,
>I'm working on an MDI app that will open/create/save a lot of files. How do I prevent these files from being added to
>the Recent Documents folder? Everything that I've read/found on this subject relates to ensuring that a file gets added.
Are you using a Common Dialog to pick the file to open/save? I think
that's what adds the document to the Recent folder, not your VB code.
If that's it, one workaround, at least for Windows 2000, is to use the
GetOpenFileName API to show the dialog, and include the
OFN_DONTADDTORECENT flag.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
CodeHound - Free VB Search Engine
http://www.codehound.com
-
Re: Windows Recent Documents folder
Mattias,
Thanks. I'm actually using a class (CDialog, downloaded from Larry Rebich's site) to open the dialog. Looking at this
class, I didn't find the OFN_DONTADDTORECENT constant in it; That could explain a lot.
Looking at the API Viewer (default VB6 add-in), I discovered that this constant isn't listed. So now I have 2 more
questions:
- What is the value of OFN_DONTADDTORECENT?
- Where did you find this constant and its value? With this info I can search for and locate things for myself and,
someday, just maybe, be as knowledgable and competant as you ;-)
--
Kent
rkcripps@softhome.net
Mattias Sjögren <mattiass.dont.want.spam@hem.passagen.se> wrote in message news:39b90fa3.38157117@news.devx.com...
> Kent,
>
> >I'm working on an MDI app that will open/create/save a lot of files. How do I prevent these files from being added to
> >the Recent Documents folder? Everything that I've read/found on this subject relates to ensuring that a file gets
added.
>
> Are you using a Common Dialog to pick the file to open/save? I think
> that's what adds the document to the Recent folder, not your VB code.
>
> If that's it, one workaround, at least for Windows 2000, is to use the
> GetOpenFileName API to show the dialog, and include the
> OFN_DONTADDTORECENT flag.
>
>
> Matt
>
> ============================================
> Mattias Sjögren - mattiass @ hem.passagen.se
> CodeHound - Free VB Search Engine
> http://www.codehound.com
-
Re: Windows Recent Documents folder
Mattias,
Thanks. I'm actually using a class (CDialog, downloaded from Larry Rebich's site) to open the dialog. Looking at this
class, I didn't find the OFN_DONTADDTORECENT constant in it; That could explain a lot.
Looking at the API Viewer (default VB6 add-in), I discovered that this constant isn't listed. So now I have 2 more
questions:
- What is the value of OFN_DONTADDTORECENT?
- Where did you find this constant and its value? With this info I can search for and locate things for myself and,
someday, just maybe, be as knowledgable and competant as you ;-)
--
Kent
rkcripps@softhome.net
Mattias Sjögren <mattiass.dont.want.spam@hem.passagen.se> wrote in message news:39b90fa3.38157117@news.devx.com...
> Kent,
>
> >I'm working on an MDI app that will open/create/save a lot of files. How do I prevent these files from being added to
> >the Recent Documents folder? Everything that I've read/found on this subject relates to ensuring that a file gets
added.
>
> Are you using a Common Dialog to pick the file to open/save? I think
> that's what adds the document to the Recent folder, not your VB code.
>
> If that's it, one workaround, at least for Windows 2000, is to use the
> GetOpenFileName API to show the dialog, and include the
> OFN_DONTADDTORECENT flag.
>
>
> Matt
>
> ============================================
> Mattias Sjögren - mattiass @ hem.passagen.se
> CodeHound - Free VB Search Engine
> http://www.codehound.com
-
Re: Windows Recent Documents folder
Hi Kent!
>- What is the value of OFN_DONTADDTORECENT?
Const OFN_DONTADDTORECENT = &H2000000
>- Where did you find this constant and its value?
It's listed in the MSDN docs for the OPENFILENAME structure used in
the API call.
http://msdn.microsoft.com/library/ps...mdlg3_1hma.htm
I got the value from a C++ header file in the Platform SDK.
http://msdn.microsoft.com/downloads/...m/platform.asp
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
-
Re: Windows Recent Documents folder
Hi Kent!
>- What is the value of OFN_DONTADDTORECENT?
Const OFN_DONTADDTORECENT = &H2000000
>- Where did you find this constant and its value?
It's listed in the MSDN docs for the OPENFILENAME structure used in
the API call.
http://msdn.microsoft.com/library/ps...mdlg3_1hma.htm
I got the value from a C++ header file in the Platform SDK.
http://msdn.microsoft.com/downloads/...m/platform.asp
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
-
Re: Windows Recent Documents folder
Thanks, yet again. How much of this SDK is NOT available in the July issue of the MSDN library subscription? I need to
decide if I want/need to install this.
From the download page: "A complete install of all features of the Platform SDK is 523.1 MB". That's a **** big dl for a
56k connection.
Kent
Mattias Sjögren <mattiass.dont.want.spam@hem.passagen.se> wrote in message news:39b97fa3.66829285@news.devx.com...
> Hi Kent!
>
> >- What is the value of OFN_DONTADDTORECENT?
>
> Const OFN_DONTADDTORECENT = &H2000000
>
>
> >- Where did you find this constant and its value?
>
> It's listed in the MSDN docs for the OPENFILENAME structure used in
> the API call.
>
> http://msdn.microsoft.com/library/ps...mdlg3_1hma.htm
>
> I got the value from a C++ header file in the Platform SDK.
>
> http://msdn.microsoft.com/downloads/...m/platform.asp
>
>
> Matt
>
> ============================================
> Mattias Sjögren - mattiass @ hem.passagen.se
-
Re: Windows Recent Documents folder
Thanks, yet again. How much of this SDK is NOT available in the July issue of the MSDN library subscription? I need to
decide if I want/need to install this.
From the download page: "A complete install of all features of the Platform SDK is 523.1 MB". That's a **** big dl for a
56k connection.
Kent
Mattias Sjögren <mattiass.dont.want.spam@hem.passagen.se> wrote in message news:39b97fa3.66829285@news.devx.com...
> Hi Kent!
>
> >- What is the value of OFN_DONTADDTORECENT?
>
> Const OFN_DONTADDTORECENT = &H2000000
>
>
> >- Where did you find this constant and its value?
>
> It's listed in the MSDN docs for the OPENFILENAME structure used in
> the API call.
>
> http://msdn.microsoft.com/library/ps...mdlg3_1hma.htm
>
> I got the value from a C++ header file in the Platform SDK.
>
> http://msdn.microsoft.com/downloads/...m/platform.asp
>
>
> Matt
>
> ============================================
> Mattias Sjögren - mattiass @ hem.passagen.se
-
Re: Windows Recent Documents folder
Hi Kent!
>How much of this SDK is NOT available in the July issue of the MSDN library subscription? I need to
>decide if I want/need to install this.
I think only the SDK documentation is included in a MSDN Library
subscription. No tools, header files or other fun stuff.
>From the download page: "A complete install of all features of the Platform SDK is 523.1 MB". That's a **** big dl for a
>56k connection.
When you run the setup, you'll be able to select the parts you want to
install. You don't have to download everything.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
-
Re: Windows Recent Documents folder
Hi Kent!
>How much of this SDK is NOT available in the July issue of the MSDN library subscription? I need to
>decide if I want/need to install this.
I think only the SDK documentation is included in a MSDN Library
subscription. No tools, header files or other fun stuff.
>From the download page: "A complete install of all features of the Platform SDK is 523.1 MB". That's a **** big dl for a
>56k connection.
When you run the setup, you'll be able to select the parts you want to
install. You don't have to download everything.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks