Print Page | Close Window

CommonDialog Max Entires

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=18358
Printed Date: 27 November 2024 at 7:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommonDialog Max Entires
Posted By: XiMaker
Subject: CommonDialog Max Entires
Date Posted: 11 May 2011 at 6:45pm

I'm having an issue with using the CommonDialog control when using the cdlOFNAllowMultiselect flag.  when I hit the  CommonDialog1.ShowOpen  It will let me select as many files as I want but if I select more than 6 or 7 long filenames I get a single character of junk in the FileName property.  If I select less that 5 it will return the files correctly and the  GetNextFileName works correctly too.  What can I do to enlarge the number of allowable files for Multiselect that will be returned?




Replies:
Posted By: XiMaker
Date Posted: 18 May 2011 at 10:38am
Anyone? 


Posted By: Oleg
Date Posted: 19 May 2011 at 1:39am
What code you have ?

I tried such code with our SuiteControl sample and it show all files correctly:

Dim f As String
    f = CommonDialog.FileName
    While (f <> "")
        Debug.Print f
        f = CommonDialog.GetNextFileName
    Wend


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JantjeKeizer
Date Posted: 19 May 2011 at 3:24am

set the MaxFileSize property of the commondialog first.

the size is the buffer for all the strings combined.

so for example

cdlg.MaxFileSize = 6000



Posted By: XiMaker
Date Posted: 19 May 2011 at 5:14am
SO SIMPLE - thanks that did the trick...
 

cdlg.MaxFileSize = 6000

 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net