Windows Recent Documents folder


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Windows Recent Documents folder

  1. #1
    Kent Guest

    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







  2. #2
    Mattias Sjögren Guest

    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

  3. #3
    Mattias Sjögren Guest

    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

  4. #4
    Kent Guest

    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




  5. #5
    Kent Guest

    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




  6. #6
    Mattias Sjögren Guest

    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

  7. #7
    Mattias Sjögren Guest

    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

  8. #8
    Kent Guest

    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




  9. #9
    Kent Guest

    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




  10. #10
    Mattias Sjögren Guest

    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

  11. #11
    Mattias Sjögren Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center