How to store data(images, Text, Music) in one file? like.dat
-
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser :sigh: so pleaaaasee help me with a project sample and pleeeaaase let me know how would my program reads these files to use them. how :((
-
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser :sigh: so pleaaaasee help me with a project sample and pleeeaaase let me know how would my program reads these files to use them. how :((
Try here: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6fb159cb-b195-409b-b8ad-702e457b0692[^] :-D
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
-
Try here: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6fb159cb-b195-409b-b8ad-702e457b0692[^] :-D
Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
This is my thread in msdn forms and nothing helps there...
-
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser :sigh: so pleaaaasee help me with a project sample and pleeeaaase let me know how would my program reads these files to use them. how :((
Alsayed web wrote:
sorry I have no code because I'am a looooooooser :sigh:
That's no way to introduce yourself. You got the same type of brain that I have, and you probably run on water and sunlight like the rest of us. Use a database (like SQL CE or SQLite), encrypt the contents and rename the extension to ".dat". Use a folder, zip it and rename the zipfile to ".dat". Use an Xml file, and store the other files in Base64-encoding, and rename it to ".dat". Let's start simple; can you post the code here to write the line "Hello world" to a file? If not, that's where to start :)
Bastard Programmer from Hell :suss:
-
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser :sigh: so pleaaaasee help me with a project sample and pleeeaaase let me know how would my program reads these files to use them. how :((
These select quotes from the thread of yours @ MSDN says it all:
Alsayed web wrote:
and please don't say what should I do, just give me a link or a code
Cor Ligthert (MVP) wrote:
Why don't you simple say, don't say what should I do, just make and sell it for me and give me the money.
Riced(FWSR) wrote:
It's not a duplicate(thread) but a triplicate(thread). Also posted on CodeProject because he cannot get an answer here. LOL Quote from CodeProject reply when I pointed him here: "This is my thread in msdn forms and nothing helps there..." :)
-
This is my thread in msdn forms and nothing helps there...
"Use a zip file and change the extension" That does not help you? That is quite a common way nowadays. Ever tried it the other way round, with say a .docx? Do that! Rename a Word document to a zip file, and unzip it!
-
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser :sigh: so pleaaaasee help me with a project sample and pleeeaaase let me know how would my program reads these files to use them. how :((
If you want to do it through your own code, use a FileStream to read the files into memory and another to write them to the same file. FileStreams read the raw bytes of the files. You'll want to put some sort of delimiter between the files so you can separate them later. To add your delimiter to the file, create a string and then use System.Text.Encoding.Ascii.GetBytes(YourStringVariable). That will give you a byte array with which to write with the filestream's write method. Hope that wasn't too confusing! Ray PS: If you want to compress your files, there are lots of examples for compressing files in .NET, just search google for "compression vb.net"