System icons on windows  
Author Message
kcwong





PostPosted: 2007-9-7 17:46:00 Top

java-programmer, System icons on windows On Sep 7, 5:02 pm, Nuno <email***@***.com> wrote:
> 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.

 
Hunter Gratzner





PostPosted: 2007-9-7 17:53:00 Top

java-programmer >> System icons on windows On Sep 7, 11:02 am, Nuno <email***@***.com> wrote:
> 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.

 
Real Gagnon





PostPosted: 2007-9-7 19:23:00 Top

java-programmer >> System icons on windows > 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.
--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
 
 
Christian





PostPosted: 2007-9-7 22:16:00 Top

java-programmer >> System icons on windows Nuno schrieb:
> On 7 Set, 12:23, Real Gagnon <realgag+email***@***.com> wrote:
>>> 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.
>> --
>> 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
>
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 ..
 
 
nebulous99





PostPosted: 2007-9-8 9:47:00 Top

java-programmer >> System icons on windows On Sep 7, 5:53 am, Hunter Gratzner <email***@***.com> wrote:
> 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





PostPosted: 2007-9-8 16:48:00 Top

java-programmer >> System icons on windows On Sep 8, 3:47 am, email***@***.com wrote:
> On Usenet, being a netkkkop is frowned upon more.

Paul, go away.

 
 
nebulous99





PostPosted: 2007-9-9 11:53:00 Top

java-programmer >> System icons on windows On Sep 8, 4:48 am, Hunter Gratzner <email***@***.com> wrote:
> On Sep 8, 3:47 am, email***@***.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鴍





PostPosted: 2007-9-10 2:01:00 Top

java-programmer >> System icons on windows email***@***.com wrote:
> On Sep 8, 4:48 am, Hunter Gratzner <email***@***.com> wrote:
>> On Sep 8, 3:47 am, email***@***.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...

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


 
 
Roedy Green





PostPosted: 2007-9-10 17:26:00 Top

java-programmer >> System icons on windows On Fri, 07 Sep 2007 02:02:47 -0700, Nuno <email***@***.com>
wrote, quoted or indirectly quoted someone who said :

>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

--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
nebulous99





PostPosted: 2007-9-11 10:53:00 Top

java-programmer >> System icons on windows On Sep 9, 2:00 pm, Arne Vajh鴍 <email***@***.com> wrote:
[snip unwanted, off-topic, potentially-illegal, and just plain wrong
speculation about my identity]

Shut up.

 
 
kaldrenon





PostPosted: 2007-9-11 12:26:00 Top

java-programmer >> System icons on windows On Sep 10, 10:53 pm, email***@***.com wrote:
> On Sep 9, 2:00 pm, Arne Vajh鴍 <email***@***.com> 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





PostPosted: 2007-9-11 16:11:00 Top

java-programmer >> System icons on windows [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





PostPosted: 2007-9-12 0:28:00 Top

java-programmer >> System icons on windows On Tue, 11 Sep 2007 08:10:59 -0000, email***@***.com wrote, quoted
or indirectly quoted someone who said :

>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.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com