Custom File Extension

Graham

Member
Joined
Feb 17, 2007
Messages
13
Programming Experience
5-10
Is it possible to have a custom file extension, I want the files saved with the extension *.qwd if it is possible how do I do it?
These will be text documents created in a RTB so I would like all the formating saved just like a rich text document.
 
A file can be saved with any extension you choose, but beware of using an extension that is common with other applications because user will have to choose only one as default extension handler, check http://www.fileinfo.net/extension/ or http://www.file-extensions.org/

To enable users to doubleclick the file in Windows Explorer and have it open in default (your) application you have to register the extension in registry. This can be done with MSI installer project (not ClickOnce) or by setting the registry keys through code. You don't need to register the extension if you don't care about the Explorer feature, if you save a file with your custom content you can open it again regardless of its default association.
 
Back
Top