Click here to Skip to main content
Licence 
First Posted 8 Jun 2004
Views 64,794
Bookmarked 38 times

Files Chooser Dialog

By | 24 Jan 2005 | Article
Choose a list of files or folders, and then save or load it.

Files Chooser Dialog

Introduction

It's the very first thing I programmed, so please excuse me if maybe some things aren't done like by a seasoned programmer. This control simply allows to choose a list of files or folders and then save or load it. I commented the code very well, I think you'll understand all my mess quite easily ;-) I spent an extensive time on the GUI and features:

  • Displays the full path or only files names
  • Displays the number of added items
  • You can put a cross on the items you want added in your own program
  • Checks in real time any changes in the files or folders
  • Updates the list of drives and files when a CD-ROM is inserted or removed
  • Drag and drop is supported
  • All the settings are automatically stored in a bin file
  • When you load or save a list, it checks if the files still exist
  • A combobox contains all the recently visited paths
  • You can write a path directly on this combobox
  • You can display messages on this combobox too
  • There's a pin for leaving the form on the top

Please note that only European characters are supported, but I think you can modify it without too much work. I think there aren't any bugs, but I would be very happy to correct any. Enjoy!

Background

  • I retrieve the system icons, thanks to the excellent code from Steve McMahon here.
  • I got my rounded buttons from here, the author is unknown.
  • I got the drive combobox by Odah from here.

Using the code

I included an example that shows how to (easily) retrieve the selected files and the last visited path. The dialog box code is really too long to show here.

History

  • June 11 2004: I corrected a bug, and now it asks you if you want to delete missing files from the list, at startup.
  • January 22 2005: A few bug fixes, and now it works well on systems with drive A:\. The drive A:\ support was simply removed because it slowed down much the whole thing.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Patrick Dorin

Web Developer

France France

Member

I'm a stock trader, but sometimes I need to develop some code...

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralDelete File dialog Pinmemberanatsg3:08 17 Jul '04  
GeneralRe: Delete File dialog PinmemberPatrick Dorin5:45 17 Jul '04  
GeneralRe: Delete File dialog Pinmemberanatsg8:00 17 Jul '04  
GeneralRe: Delete File dialog PinmemberPatrick Dorin7:59 18 Jul '04  
GeneralThis solution does not build in VS.NET 2002 PinmemberP VIJAYAKRISHNA22:54 16 Jun '04  
GeneralRe: This solution does not build in VS.NET 2002 PinmemberPatrick Dorin5:41 17 Jul '04  
GeneralException when I Add Files PinmemberUlli Richter20:56 15 Jun '04  
GeneralRe: Exception when I Add Files PinmemberPatrick Dorin6:37 16 Jun '04  
GeneralRe: Exception when I Add Files Pinmemberishdaifat19:58 13 Jul '04  
GeneralRe: Exception when I Add Files PinmemberPatrick Dorin5:40 17 Jul '04  
Question"impressing the girls"? PinsitebuilderUwe Keim21:23 8 Jun '04  
AnswerRe: "impressing the girls"? PinmemberVladimir Ralev6:46 9 Jun '04  
GeneralRe: "impressing the girls"? PinsussAnonymous8:06 9 Jun '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 25 Jan 2005
Article Copyright 2004 by Patrick Dorin
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid