iNET Interactive - Online Advertising Agency
          
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > multi-select in the Open Dialog


Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2000, 03:48 AM
centiipede centiipede is offline
Junior Contributor
 
Join Date: Aug 2000
Location: WA USA
Posts: 174
Default multi-select in the Open Dialog

When using the cdlOFNAllowMultiselect flag in the Open Files common dialog, how do i pass the paths, or names of all the files that the user selected? I have tried passing file name, but it gives me errors.

I have never seen examples using this function, and MSDN seems to only have the cdlOFNAllowMultiselect listed with other flags, no examples.

thanks!



çentipede

cent1pede@hotmail.com
Reply With Quote
  #2  
Old 10-18-2000, 04:34 AM
Phil
Guest
 
Posts: n/a
Default Re: multi-select in the Open Dialog

Hi,

The FileName property after multiple files have been selected contains a list of filenames separated by spaces " ". If you are using VB6 you can then use the Split function to return an array of filenames.
If you are using earlier versions check out the MSDN on how to simulate the split (and other) string functions.

Phil

Reply With Quote
  #3  
Old 10-18-2000, 02:29 PM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Preferred language:
Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default Re: multi-select in the Open Dialog

One problem is that the AllowMultiSelect flag is not compatible with one of the other flags, the one that allows long filenames. The problem is that the files come back space delimited and if long filenames are enabled, it could include a space in the name. The workaround is to set multiselect and also select the explorer flag. This allows long filenames and multiple files but the files are NULL delimited. Also, it only works under 32 bit windows.

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement: