开发者

Custom file type and icon

开发者 https://www.devze.com 2022-12-23 03:23 出处:网络
I have a game I\'m writing in java, it has the functionality to save games and load them all working with .txt files but I thought it would be cool if I could have my own file type...I know I can just

I have a game I'm writing in java, it has the functionality to save games and load them all working with .txt files but I thought it would be cool if I could have my own file type...I know I can just set it to save as a type that isn't already defined but then I get a blank icon for the file...is there a way I can give it a custom file icon in java?开发者_Python百科 I've looked online etc but all I find is the microsoft website explaining some of it in c# and vb etc...


I would think if you created the filetype in windows, provided you are in Windows, you can add the file type to the system. then go view existing file types. Now associate your icon to that type.

Here is how to do it in Windows:

http://www.watchingthenet.com/associate-delete-file-types-in-windows-vista.html

in previous versions of windows this can be in Explorer. Google around easy find.

Now once you have added the type, do this:

http://www.webtlk.com/2009/03/20/how-to-change-the-icon-assiciated-with-a-file-in-windows-vista-and-windows-7/

This will only do this on your machine, if you need to deploy this, and want this on another machine this way, this should give you enough to work with to script it out with like InstallShield. If you tell me the installer you will be deploying, I can even provide a script.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号