Java Forum / General / September 2007
System icons on windows
Nuno - 07 Sep 2007 10:02 GMT Hello,
There is any way of retrieving from the system the icons associated to the windows explorer files? Example .rar extension has a nice book icon, how to retrieve this icon and use it on my application or any other file?
Nuno
kcwong - 07 Sep 2007 10:46 GMT > Hello, > [quoted text clipped - 4 lines] > > Nuno Google for icon extractors, or resource extractors... there're many free ones.
If you have Visual Studio, you can open DLL or EXE file as Resource. Then you can save the icons to image files.
Hunter Gratzner - 07 Sep 2007 10:53 GMT > There is any way of retrieving from the system the icons associated to > the windows explorer files? Yes, but icons are typically copyrighted material.
> how to retrieve this icon and use it on my application It is not a very bright idea to announce an intended copyright violation pin public.
nebulous99@gmail.com - 08 Sep 2007 02:47 GMT > It is not a very bright idea to announce an intended copyright > violation pin public. On Usenet, being a netkkkop is frowned upon more.
Hunter Gratzner - 08 Sep 2007 09:48 GMT On Sep 8, 3:47 am, nebulou...@gmail.com wrote:
> On Usenet, being a netkkkop is frowned upon more. Paul, go away.
nebulous99@gmail.com - 09 Sep 2007 04:53 GMT > On Sep 8, 3:47 am, nebulou...@gmail.com wrote: > > > On Usenet, being a netkkkop is frowned upon more. > > Paul, go away. This response is rather odd, since it seems to have nothing to do with the post it follows up to. Who is Paul? That name isn't anywhere else in this thread, so I can't begin to guess who you're referring to...
Arne Vajhøj - 09 Sep 2007 19:00 GMT >> On Sep 8, 3:47 am, nebulou...@gmail.com wrote: >>> On Usenet, being a netkkkop is frowned upon more. [quoted text clipped - 3 lines] > the post it follows up to. Who is Paul? That name isn't anywhere else > in this thread, so I can't begin to guess who you're referring to... You don't have to guess - you just need to remember some relative recent threads where you were presented for various peoples reasons to believe that you are Paul Derbyshire.
You deny that it is true, but it seems rather silly to deny knowing why people think so.
Arne
nebulous99@gmail.com - 11 Sep 2007 03:53 GMT On Sep 9, 2:00 pm, Arne Vajh?j <a...@vajhoej.dk> wrote: [snip unwanted, off-topic, potentially-illegal, and just plain wrong speculation about my identity]
Shut up.
kaldrenon - 11 Sep 2007 05:25 GMT On Sep 10, 10:53 pm, nebulou...@gmail.com wrote:
> On Sep 9, 2:00 pm, Arne Vajh?j <a...@vajhoej.dk> wrote: > [snip unwanted, off-topic, potentially-illegal, and just plain wrong > speculation about my identity] > > Shut up. Arne didn't actually speculate about your identity. He just pointed out that it's a little odd for you to pretend that you're unaware of the several speculations and attempts to uncover your identity that have been made recently.
Frankly, I don't care if you're Paul Derbyshire. If you are, then that means I only have one person to pity. If you're not, there are two, since the information (true or false) presented about Paul made him sound a lot like you. But whether you are or not, please don't pretend that people haven't suggested it before.
nebulous99@gmail.com - 11 Sep 2007 09:10 GMT [snip a whole load of BS]
Perhaps the message wasn't clear. What I meant to say was this:
END OF DISCUSSION
My offline identity is not a topic for discussion in comp.lang.java.programmer and that is final. End of story. End of thread. Finito.
Now go away.
Roedy Green - 11 Sep 2007 17:28 GMT >My offline identity is not a topic for discussion in >comp.lang.java.programmer and that is final. End of story. End of >thread. Finito. If you are playing games with your identity, it suggests you may be a malicious character and your advice may be harmful.
 Signature Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
nebulous99@gmail.com - 13 Sep 2007 07:04 GMT On Sep 11, 12:28 pm, Roedy Green <see_webs...@mindprod.com.invalid> wrote:
> On Tue, 11 Sep 2007 08:10:59 -0000, nebulou...@gmail.com wrote, quoted > or indirectly quoted someone who said : [quoted text clipped - 5 lines] > If you are playing games with your identity, it suggests you may be a > malicious character and your advice may be harmful. I am not "playing games" with my identity. The reason I have two (Twisted and Nebulous) has been explained here before; and the reason I am now only using Nebulous is because someone (and I suspect I know exactly who, and that they are a regular here in cljp) destroyed the Twisted one somehow -- I can log in to it at GG, but if I navigate to a group and try to post I find it's logged out again all by itself after a short time. This started about a week ago.
Real Gagnon - 07 Sep 2007 12:23 GMT > There is any way of retrieving from the system the icons associated to > the windows explorer files? Example .rar extension has a nice book > icon, how to retrieve this icon and use it on my application or any > other file? "Display icon associated with an executable" http://www.rgagnon.com/javadetails/java-0439.html
Bye.
 Signature Real Gagnon from Quebec, Canada * Java, Javascript, VBScript and PowerBuilder code snippets * http://www.rgagnon.com/howto.html * http://www.rgagnon.com/bigindex.html
Nuno - 07 Sep 2007 13:49 GMT > > There is any way of retrieving from the system the icons associated to > > the windows explorer files? Example .rar extension has a nice book [quoted text clipped - 9 lines] > *http://www.rgagnon.com/howto.html > *http://www.rgagnon.com/bigindex.html Ok this will work just fine
Program program = Program.findProgram(extension); ImageData imageData = (program == null ? null : program.getImageData()); if (imageData != null) { image = new Image(Display.getCurrent(), imageData);
But now i need to get the default images for the folders, open and close folders, and for the default file. any one knows how to do it?
Nuno
Nuno
Christian - 07 Sep 2007 15:15 GMT Nuno schrieb:
>>> There is any way of retrieving from the system the icons associated to >>> the windows explorer files? Example .rar extension has a nice book [quoted text clipped - 23 lines] > > Nuno Though SWT program class doesn't work too well either. I don't get allways the correct image for some file. For default file and folders I am using usually icons that are under LGPL ... these should fit with most licenses ..
Roedy Green - 10 Sep 2007 10:26 GMT >There is any way of retrieving from the system the icons associated to >the windows explorer files? Example .rar extension has a nice book >icon, how to retrieve this icon and use it on my application or any >other file? There are three parts to the problem.
1. looking up in the registry the extension to find the corresponding exe. For this you need JNI. See http://mindprod.com/jgloss/jni.html http://mindprod.com/jgloss/registry.html http://mindprod.com/project/associations.html
2. Once you find the exe, you need to navigate the exe header to find the embedded *.ico file. see http://mindprod.com/jgloss/icon.html
3. Extract the desired image size out of the ico and convert it to a PNG. Perhaps can do this with JAI. I have not looked. see http://mindprod.com/jgloss/jai.html
 Signature Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|