Frank O's CommonDialog Class & MaxFileSize

Frank O's CommonDialog Class & MaxFileSize

Anonymous
Not applicable
322 Views
3 Replies
Message 1 of 4

Frank O's CommonDialog Class & MaxFileSize

Anonymous
Not applicable
Hi All I'm using Frank's excellent class routine in multi file select mode. Initially the line below was 256, which allowed only about half a dozen files to be selected in one go. I've upped it to 1024 & ran it a couple of times - it works fine, but just to be sure, I want to check if there's anything I should be aware of. Does it need to be in multiples of 256? Private Sub Class_Initialise() mvarMaxFileSize = 1024 ' DOES THIS CAUSE A PROBLEM? mvarFileName = String(mvarMaxFileSize, 0) End Sub Another Q: The returned files are out of order: when using the shift key the first selected is listed last & last selected is first. The rest in the middle are in order. Is this consistent? If it is I can work around it, or is there a way to solve it? Cheers TIA Dave F.
0 Likes
323 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Dave F wrote: > Does it need to be in multiples of 256? No. That property sets the size of the internal string buffer used to return the selected file names to you. You can set it to whatever you like. > Another Q: > The returned files are out of order: when using the shift key the > first selected is listed last & last selected is first. > The rest in the middle are in order. > Is this consistent? If it is I can work around it, or is there a way > to solve it? This behavior stems from the API itself. -- There are 10 kinds of people. Those who understand binary and those who don't. http://code.acadx.com (Pull the pin to reply)
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks Frank, One more Q: Is there a way to set it dynamically once I know the length of the returned string? TIA Dave F. "Frank Oquendo" wrote in message news:403f9f28$1_2@newsprd01... > Dave F wrote: > > > Does it need to be in multiples of 256? > > No. That property sets the size of the internal string buffer used to return > the selected file names to you. You can set it to whatever you like. > > > Another Q: > > The returned files are out of order: when using the shift key the > > first selected is listed last & last selected is first. > > The rest in the middle are in order. > > Is this consistent? If it is I can work around it, or is there a way > > to solve it? > > This behavior stems from the API itself. > > -- > There are 10 kinds of people. Those who understand binary and those who > don't. > > http://code.acadx.com > (Pull the pin to reply) > >
0 Likes
Message 4 of 4

Anonymous
Not applicable
Dave F wrote: > Thanks Frank, > > One more Q: > Is there a way to set it dynamically once I know the length of the > returned string? No. An improperly sized buffer will yield truncated results if not just plain 'ol garbage. -- There are 10 kinds of people. Those who understand binary and those who don't. http://code.acadx.com (Pull the pin to reply)
0 Likes