Re: [2005] Creating Formats
Just change the extension! It's as simple as that! Then, only your program will know what to do/how to open the file.
Re: [2005] Creating Formats
Yes, obi1kenobi is right. If your program is saving the file, than just save it with a different extension.
Be sure to open it using that same extension aswell obviously.
However, windows will not automatically recognize that your file format belongs to your program (for example, if you rename something to ".txt", windows will usually open it with notepad. If you would rename a file to ".yourextension", this will probably not happen.
I'm not sure how to make that happen, you probably have to do some registry editing.
Re: [2005] Creating Formats
No, actually I remember reading somewhere on this forum about a way to make Windows recognize your format as the native format of your application. I'll do a bit of searching and if I find the thread I'll post it.
EDIT: Here it is, I've found it: http://www.vbforums.com/showthread.php?t=503333
Re: [2005] Creating Formats
Thankyou for your help that seems very simple.
Re: [2005] Creating Formats
All files are simply bytes on a disc. Any application can write bytes to a disc, so any application can create a file of your type, AS LONG AS IT KNOWS THE FORMAT. The file extension is just a way to tell Windows and other applications how to handle a file. It doesn't actually change the file itself. If you change the extension of a Word document to ".xyz" then Windows won't know it's a Word document but it still is. If you open Word and point it to that file it will open it up as normal. Any other application can read or write a compatible file as long as it understands the format.
Mnay binary file formats are very complex, so working out the spec by reverse engineering is difficult. Microsoft have released the spec for Office file formats publicly, so anyone can create applications that can read or write Office documents. The same goes for the PDF format and many others. Sometines you need to pay a license fee if you want use a proprietary file format.
So, to you. You can define your file format any way you like. It might be binary or text. Unless you put measures in place anyone will be able to read, write and otherwise use your file format. That's assuming they'd have a reason to do so, which is unlikely. The file extension will indicate to Windows that it's a file of your type, so it will then use the registered file association to open your application when the user executes a file of that type. Other than that a file is just a file and any app is free to make anything it wants of any file.