-
How do you have multi flags?
Code:
CommonDialog1.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
CommonDialog1.Flags = cdlOFNHideReadOnly
CommonDialog1.Flags = cdlOFNOverwritePrompt
CommonDialog1.ShowSave
This code only takes the last flag so the Over Write Prompt works, but the Read Only part is still there.
-
Use the OR opertator:
CommonDialog1.Flags = cdlOFNHideReadOnly or cdlOFNOverwritePrompt
-
The plus (+) operator will also work here (you can "add" all the desired flags):
Code:
CommonDialog1.Flags = cdlOFNHideReadOnly + cdlOFNOverwritePrompt
-
that may work but when you have flags that interfere like:
vbthisflag=3 (1+2)
vbthatflag=1 (1)
you will get 4 which could be a totally different flag
1 + 3 = 4
if you use or it will skip all interfering flags:
1 or 3 = 3
-
multiple dlg flags
I have searched all of vb help that comes with 5.0 and from what I can tell there is no way at all to have multiple flags. Maybe if u check the microsoft, vb website and search their knowledge database. If u find an answer please send this way too.
-
Where does it say that?
Kedaman's method would probably work.
-
Flags are always an amount of boolean switches:
&H1
&H2
&H4
&H8
&H10
&H20
..
so when you use or operator you will only switch the booleans on but not off:
101011010101001 OR
111010010101011
_______________
111011010101011
hope this helped
-
I use:
CommonDialog1.Flags = &H2 & &H4
But when I set the flag for allowing choosing multipel files I get a common dialog which looks like the one for Win 3.1.
Does anyone experiance this as well?
Aslo, I've noticed that I can't use more then two or three flags at the same time.
Pentax