Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Using IFileOpenDialog in C#

Using IFileOpenDialog in C#

Scheduled Pinned Locked Moved COM
csharpcomtutorial
3 Posts 3 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jonesap5
    wrote on last edited by
    #1

    Does anyone know how to use these new Vista COM objects in a C# project. I am talking about the IFileDialog objects/classes/libraries/idl's and all that inherit from it. Thanks, Adam

    M C 2 Replies Last reply
    0
    • J jonesap5

      Does anyone know how to use these new Vista COM objects in a C# project. I am talking about the IFileDialog objects/classes/libraries/idl's and all that inherit from it. Thanks, Adam

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      The best place to point you is probably the Common Item Dialogs[^] documentation. I would expect Microsoft to change OpenFileDialog (etc) to eventually wrap these new interfaces, for whatever new functionality is available (if they haven't already in v3.5). What specifically does this do that you don't get from OpenFileDialog?

      DoEvents: Generating unexpected recursion since 1991

      1 Reply Last reply
      0
      • J jonesap5

        Does anyone know how to use these new Vista COM objects in a C# project. I am talking about the IFileDialog objects/classes/libraries/idl's and all that inherit from it. Thanks, Adam

        C Offline
        C Offline
        capcom923
        wrote on last edited by
        #3

        Follow this step: 1.You can download Windows® API Code Pack for Microsoft® .NET Framework 2.See how the "\Windows API Code Pack 1.1\source\WindowsAPICodePack\Shell\CommonFileDialogs\CommonFileDialog.cs" make use of IFileDialogCustomize from com. 3.If you want to add a stuff to the "Open" dropdownlist, you can write code below

        customize.EnableOpenDropDown(0);

        customize.AddControlItem(0, 0, "Open as XXX");

        customize.AddControlItem(0, 1, "Open in YYY");

        Note: 0 is the Open Button ID After user selected, you can get the selectedIndex through

        this.customize.GetSelectedControlItem(0, out openindex);

        Note again: 0 is the Open Button ID And then you can do something imply with filename and this openindex. Wish to help you~

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups