简体   繁体   中英

Not able to select a Font file from Windows Fonts folder using OpenFileDialog

I am trying to use the .NET Windows Form OpenFileDialog control to select a font file (not a font as you would with the FontDialog), but the dialog will not allow a mouse click to select a file in the C:\\WINDOWS\\Font directory.

Any ideas for choosing a font file

The Fonts folder is customised. In order to make it behave like a normal folder - and allow a font file to be selected from it - you need to remove the ReadOnly and System attributes with attrib -s -r fonts . (This is for Windows XP/2003, I can't say for Vista/7)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM