|
-
Sep 12th, 2007, 05:55 PM
#1
Common Dialog: Selecting fonts as regular files
I am having trouble attempting to use the Common Doialog control to select font files. It will not let me select them. I don't want it to treat the files as fonts but as regular files that can be selected. how can I do this?
If I change my filter to use
Code:
F.CommonDialog1.Flags = cdlOFNHideReadOnly + cdlOFNPathMustExist + cdlOFNNoReadOnlyReturn + cdlOFNAllowMultiselect + cdlOFNLongNames + cdlOFNExplorer
F.CommonDialog1.Filter = "Fonts |*.ttf"
I cannot select the font files even though the control will show them. But if I change the filter to
Code:
F.CommonDialog1.Flags = cdlOFNHideReadOnly + cdlOFNPathMustExist + cdlOFNNoReadOnlyReturn + cdlOFNAllowMultiselect + cdlOFNLongNames + cdlOFNExplorer
F.CommonDialog1.Filter = "Fonts |*.*"
It still will not let me select the font files, but I can select any other type of file.
Last edited by randem; Sep 13th, 2007 at 03:14 AM.
-
Sep 12th, 2007, 06:51 PM
#2
Re: Common Dialog selecting fonts as regular files
As the Cd autoexecutes the font instead of getting the Font name, i think the easiest solution would be creating your own MsgBox, like..
Code:
Dim Str As String
Str = Dir("C:\windows\fonts\*.*", vbNormal)
While LenB(Str)
List1.AddItem Str
Str = Dir()
Wend
This example es too basic but i think you get what i meant.
-
Sep 12th, 2007, 10:35 PM
#3
Re: Common Dialog selecting fonts as regular files
Yeah, I was trying to avoid that... Oh well I guess I cannot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|