System icons on windows

N

Nuno

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
 
K

kcwong

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

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.
 
H

Hunter Gratzner

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.
 
N

Nuno

"Display icon associated with an executable"http://www.rgagnon.com/javadetails/java-0439.html

Bye.
--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
*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
 
C

Christian

Nuno said:
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
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 ..
 
N

nebulous99

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...
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

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...

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
 
R

Roedy Green

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
 
N

nebulous99

[snip unwanted, off-topic, potentially-illegal, and just plain wrong
speculation about my identity]

Shut up.
 
K

kaldrenon

[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.
 
N

nebulous99

[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.
 
R

Roedy Green

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.
 
N

nebulous99

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top