CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    2

    How to display thumbnail view of a folder in VB 6 ?

    Hello everybody

    I need to develope a small utility in VB 6, which displays thumbnail view of a folder and allows user ot select the files displayed in it.

    Any ideas how to proceed.

    Thnx in advance!!

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: How to display thumbnail view of a folder in VB 6 ?

    Hello and welcome.
    Why not use the common dialog control in Thumbnail mode since you anyway want to select files.
    I've attached a sample using a trick which I recently found out for own needs.
    Pressing the button opens a common file open dialog.
    The trick is, after the dialog is shown, a timer fires and sets the dialog view style to Thumbnails and also resizes it (you can adapt size and position easily to your ideas).

    The only drawback is, it will not work in the IDE, whereas the compiled executable works perfect. Load it in the IDE, look what it does (it's quite simple), compile it and run the exe.

    If you want it to allow multiple file selection I can show how you evaluate the result.
    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2006
    Posts
    2

    Re: How to display thumbnail view of a folder in VB 6 ?

    Hello Wof,
    Thanks for the response and the warm welcome!!
    Yes that would be great, i need exactly that, to select multiple files.
    Thnx

  4. #4
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: How to display thumbnail view of a folder in VB 6 ?

    Ok, I've added multi select to the code and a list box to show the selections in.
    Look at the Command1_Click routine. It shows the required flag settings of the common dialog for multiselect.
    Also it shows how to split up the resulting string into a sequence of qualified filenames.
    You have to do this splitting because the dialog returns one long string containing the path, followed by all selected names. The items are separated with the Null character.
    Hope that shows how to do it.
    Attached Files Attached Files

  5. #5
    Join Date
    Oct 2010
    Posts
    2

    Re: How to display thumbnail view of a folder in VB 6 ?

    Thanks for the response

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

Featured