Results 1 to 11 of 11

Thread: OpenFileDialog Component with preselect Thumbnails view, Details view etc.

Threaded View

  1. #4

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: OpenFileDialog Component with preselect Thumbnails view, Details view etc.

    Me again Paul, it's clear the article you linked to is a more sophisticated approach than mine. It's nice having a preview box, and who could complain about the lovely Sandra?

    Perhaps I could provide a preview box using my presently "hidden" form. The purpose of the Native Window seems to be to provide a way of passing properties from the dialog to the form; I'll have to study that a bit.

    Meanwhile, I'm not dissatisfied with my own component, even if it is a case of reinventing the wheel. I can drag the component from the Toolbox and use it exactly like a standard OpenFileDialong, but also rely on it opening in Thumbnails view. That's what I wanted. And it's pretty "lightweight" at just over 100 lines of code.

    I should point out that it I have only tested the component on WinXPsp3 and that the Enum values may have to be different for Vista+. I found these values which could be added to the present Enum:

    Code:
        Extra Large Icons = &H704D
        Large Icons = &H704F
        Medium Icons = &H704E
        Small Icons = &H7050
        List = &H7051
        Details = &H704B]
        Tiles = &H704C
    I dont know if Thumbnails remains unchanged at &H702D. I'd be interested to hear if anyone has the time to try these options out.

    Finally, it seems the icon wasn't attached as intended. I'll try adding it to this message. Ah, there it is in preview. In Firefox you can right-click on it and choose Save As; no doubt other browsers offer something similar. Make sure the name of the file is the same as the Component Class + .bmp: OpenFileDialogEx.bmp. Also make sure you add it to the build project as an Embedded Resource (see post #1). Otherwise the icon won't appear in the toolbox, just a boring cogwheel.

    BB
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width