Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my program i save some data in xml file but this file can open by many program
i need to make xml file open only by program

Thanks for help me
Posted
Comments
Sergey Alexandrovich Kryukov 26-Dec-11 18:43pm    
Why? Is it really a problem?
--SA

Instead of changing file format, you may consider encryption (see, for instance, here at CodeProject the article: "Simple encrypting and decrypting data in C#"[^]) for protecting your data.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Dec-11 18:50pm    
This is a possible thing to do, my 5, but I suspect OP means something way more simple...
Please see my answer; I think that is it.
--SA
I would recommend just to ignore this problem. What's so bad about it? If all you want is to be able to open your files created by your program only by your program, do a simple thing: use different type naming; for example, use file "extension" (there are no true file extensions anymore, thanks goodness, so this is just the end of file names), such as ".myApplication" (pick a sensible string of course, but starting with dot '.'). Register this as a new "file type" to be opened with your application. After you do this, the Shell will open files named in this way with your application by default.

Anyone who knows how to use Windows can do it manually, and there are enough instructions on how to do it programmatically in many Web sites, including CodeProject.

—SA
 
Share this answer
 
Comments
CPallini 26-Dec-11 19:07pm    
My 5.
Sergey Alexandrovich Kryukov 26-Dec-11 20:19pm    
Thank you.
--SA
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900