VB6 question

VB6 question

Anonymous
Not applicable
855 Views
13 Replies
Message 1 of 14

VB6 question

Anonymous
Not applicable
Does anyone know why when you add a multiselect filter to a showopen commondialog
that you get the version that only supports 8.3 filename formatting?

I guess the real question is how do I multiselect in a showopen dialog and be able
to work properly with long filenames?

Also is there a control that gives you a Folder Browser that looks like the one when
you save a attachment from OE?

--
Kent Keller
http://kwik-mcad.scriptmania.com/
0 Likes
856 Views
13 Replies
Replies (13)
Message 2 of 14

Anonymous
Not applicable
I figured out the first part.... I needed to add a flag = cdlOFNExplorer

Still trying to figure out a way to do the folder browser other than make my own.

--
Kent Keller
http://kwik-mcad.scriptmania.com/

"Kent Keller" wrote in message
news:40C1F75ADC6305B788DEAD2E601852F5@in.WebX.maYIadrTaRb...

> Also is there a control that gives you a Folder Browser that looks like the one
when
> you save a attachment from OE?
>
> --
> Kent Keller
> http://kwik-mcad.scriptmania.com/
>
>
>
0 Likes
Message 3 of 14

Anonymous
Not applicable
Hi!

See page http://www.mvps.org/vbnet/index.html?code/browse/browseadv.htm. It worked for me

/Per Jonson
0 Likes
Message 4 of 14

Anonymous
Not applicable
Thanks Per and Patrick
I should be able to get something working from these two examples. To bad it just
isn't a normal control that can be added.

--
Kent Keller
http://kwik-mcad.scriptmania.com/

"perjon613" wrote in message
news:f095f47.1@WebX.maYIadrTaRb...
0 Likes
Message 5 of 14

Anonymous
Not applicable
Be advised that when multiple selecting, you can run out of space in a hurry. I ran
into the years ago and wrote a dll to overcome it but that dll was coded to both the
Object ARX and Windows API and is more than a little strange (it doesn't work with
Inventor).

I think I ran across something in the Code Guru VB site:
http://www.codeguru.com/vb/index.shtml Check there. If you find something which
works and can get a module done for IV, I (we) would love to have it.

Kent Keller wrote:

> I figured out the first part.... I needed to add a flag = cdlOFNExplorer
>
> Still trying to figure out a way to do the folder browser other than make my own.
>
> --
> Kent Keller
> http://kwik-mcad.scriptmania.com/
>
> "Kent Keller" wrote in message
> news:40C1F75ADC6305B788DEAD2E601852F5@in.WebX.maYIadrTaRb...
>
> > Also is there a control that gives you a Folder Browser that looks like the one
> when
> > you save a attachment from OE?
> >
> > --
> > Kent Keller
> > http://kwik-mcad.scriptmania.com/
> >
> >
> >
0 Likes
Message 6 of 14

Anonymous
Not applicable
Increasing the MaxFileSize property will solve that that problem. The dfault
buffer size is often inadequate for multiple selection.

--
Good judgment comes from experience.
Experience comes from bad judgment.

http://www.acadx.com


"Charles Bliss" wrote in message
news:3BEF5ECF.1D6E08D3@cbliss.com...
> Be advised that when multiple selecting,
0 Likes
Message 7 of 14

Anonymous
Not applicable
In VB, correct me if I am wrong, but the buffer size can only be expanded to 65K
and it won't give you any oversize warning. I think you have to build a
callback routine or custom function. When I was doing this for AutoCAD (many
years ago) we had a minimum limit which we tested against of 2500 files. The
best we could get out of the common dialog through the API was about 140
filenames.

Frank Oquendo wrote:

> Increasing the MaxFileSize property will solve that that problem. The dfault
> buffer size is often inadequate for multiple selection.
>
> --
> Good judgment comes from experience.
> Experience comes from bad judgment.
>
> http://www.acadx.com
>
> "Charles Bliss" wrote in message
> news:3BEF5ECF.1D6E08D3@cbliss.com...
> > Be advised that when multiple selecting,
>
0 Likes
Message 8 of 14

Anonymous
Not applicable
This is what I am doing and haven't run into any problems so far, but I haven't
selected a whole ton of files yet either. I believe this is the maximum in
MaxFileSize

With CommonDialog1
.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
.MaxFileSize = 32767
.Filter = "All Files(*.*)|*.*|Inventor Files(*.ipt,*.iam,*.idw,*.ipn,
*.ide)" & _
"|*.ipt;*.iam;*.idw;*.ipn;*.ide|Part Files (*.ipt)|*.ipt|Assembly Files
(*.iam)" & _
"|*.iam|Drawing Files(*.idw)|*.idw|Presentation Files (*.ipn)|*.ipn|" & _
"iFeature Files(*.ide)|*.ide"
.FilterIndex = 2
.ShowOpen
End With


--
Kent Keller
http://kwik-mcad.scriptmania.com/

"Charles Bliss" wrote in message
news:3BEF6891.B48B65D9@cbliss.com...
> In VB, correct me if I am wrong, but the buffer size can only be expanded to 65K
> and it won't give you any oversize warning. I think you have to build a
> callback routine or custom function. When I was doing this for AutoCAD (many
> years ago) we had a minimum limit which we tested against of 2500 files. The
> best we could get out of the common dialog through the API was about 140
> filenames.
>
> Frank Oquendo wrote:
>
> > Increasing the MaxFileSize property will solve that that problem. The dfault
> > buffer size is often inadequate for multiple selection.
> >
> > --
> > Good judgment comes from experience.
> > Experience comes from bad judgment.
> >
> > http://www.acadx.com
> >
> > "Charles Bliss" wrote in message
> > news:3BEF5ECF.1D6E08D3@cbliss.com...
> > > Be advised that when multiple selecting,
> >
>
0 Likes
Message 9 of 14

Anonymous
Not applicable
One other thing I have run into that I haven't quite figured out the best way around
is now that I have both Multiselect and Long filenames this type of thing no longer
works

Dim A() As String
A = Split(sFile)
For i = LBound(A) To UBound(A)
sSingleFile = A(i)

Maybe that is why they default to the 8.3 file format when you go to multiselect?

Anyone have a quick and easy routine to separate out the individual files?
Unfortunately I am allowing a mixture of file types to be selected in one shot, so I
can't key off ipt or iam etc unless I check for all of them.

--
Kent Keller
http://kwik-mcad.scriptmania.com/
0 Likes
Message 10 of 14

Anonymous
Not applicable
If I remember correctly, the first string is the directory and the remainder are the
file names. They are all separated by /0 and the final entry is terminated by /0/0

Kent Keller wrote:

> One other thing I have run into that I haven't quite figured out the best way around
> is now that I have both Multiselect and Long filenames this type of thing no longer
> works
>
> Dim A() As String
> A = Split(sFile)
> For i = LBound(A) To UBound(A)
> sSingleFile = A(i)
>
> Maybe that is why they default to the 8.3 file format when you go to multiselect?
>
> Anyone have a quick and easy routine to separate out the individual files?
> Unfortunately I am allowing a mixture of file types to be selected in one shot, so I
> can't key off ipt or iam etc unless I check for all of them.
>
> --
> Kent Keller
> http://kwik-mcad.scriptmania.com/
0 Likes
Message 11 of 14

Anonymous
Not applicable
Kent,

Change your flags from the the "cdl" verbage to this:

.Flags = &H80200 What this stands for is the accumulated value of the multiselect and explorer values. Now you will be able to multiselect with longnames.

Mike@RTSWright
0 Likes
Message 12 of 14

Anonymous
Not applicable
Hi Mike

with what I had it was able to mulitselect with long filenames, so what is the main
advantage of what you posted ......just that it is shorter?

BTW Thanks for the examples of Events It helped a lot.

--
Kent


"MDB" wrote in message news:f095f47.9@WebX.maYIadrTaRb...
> Kent,
> Change your flags from the the "cdl" verbage to this:
>
> .Flags = &H80200 What this stands for is the accumulated value of the multiselect and
explorer values. Now you will be able to multiselect with longnames.
>
> Mike@RTSWright
>
>
0 Likes
Message 13 of 14

Anonymous
Not applicable
No problem Kent, its just a matter of spelling usually. Adding the numbers (values) together always works better for me anyways. Mike
0 Likes
Message 14 of 14

Anonymous
Not applicable
thanks Mike

It probably is a better method, and I might try to start using it, but I kind of like
being able to look at a statement and see exactly what I said without looking anything up.

--
Kent


"MDB" wrote in message news:f095f47.11@WebX.maYIadrTaRb...
> No problem Kent, its just a matter of spelling usually. Adding the numbers (values)
together always works better for me anyways. Mike
>
0 Likes