Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Icon image

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-22-2009, 09:00 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Icon image

hi,

Does anybody know how to get the icon of an application as an image (without having it separately as a *.ico file, but directly from the exe file) ?
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #2 (permalink)  
Old 12-22-2009, 06:13 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can use an application like resource hacker: Resource Hacker
Reply With Quote
  #3 (permalink)  
Old 12-23-2009, 01:56 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

thanks for the pointer, but it is not what i'm after.

I need something to work within basic4ppc - when I select a program file - to get its icon as an image on a blist item.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #4 (permalink)  
Old 12-24-2009, 10:38 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Icon Extraction ?

I found this link : CodeProject: Extracting Icons from EXE/DLL and Icon Manipulation. Free source code and programming help

Will it be possible to create a library for icon extraction, or is it possible to use the door library to do it ?

Found this as well:

"The following is an incomplete code fragment for reading icons from a .DLL or .EXE file:

Code:
// Load the DLL/EXE without executing its code
hLib = LoadLibraryEx( szFileName, 
NULL, LOAD_LIBRARY_AS_DATAFILE );
// Find the group resource which lists its images
hRsrc = FindResource( hLib, MAKEINTRESOURCE( nId ), RT_GROUP_ICON );
// Load 
and Lock to get a pointer to a GRPICONDIR
hGlobal = LoadResource( hLib, hRsrc );
lpGrpIconDir = LockResource( hGlobal );
// Using an ID from the group, Find, Load 
and Lock the RT_ICON
hRsrc = FindResource( hLib, MAKEINTRESOURCE( lpGrpIconDir->idEntries[
0].nID ),
                      RT_ICON );
hGlobal = LoadResource( hLib, hRsrc );
lpIconImage = LockResource( hGlobal );
// Here, lpIconImage points 
to an ICONIMAGE structure
]
Complete code can be found in the Icons.C module of IconPro, in a function named ReadIconFromEXEFile."

it is in this link: Icons in Win32

The application is waiting for the icons....

Thanks
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 12-24-2009 at 10:57 AM.
Reply With Quote
  #5 (permalink)  
Old 12-24-2009, 04:25 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

David's suggestion will also be the finishing touch for RichardW's File Explorer
Reply With Quote
  #6 (permalink)  
Old 12-25-2009, 07:57 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi derez.

this is great!

Best regards.

William
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i put the icon of application (f.e. tomtom) in a image box gecomail Questions (Windows Mobile) 1 09-02-2009 06:18 PM
can't find a *simple* way to show one transparent image over another image europe Questions (Windows Mobile) 4 11-10-2008 07:44 PM
How to add a image/icon to the Setup file ? mozaharul Questions (Windows Mobile) 1 09-16-2008 04:33 PM
Icon / Image in a Table to "Click" on burd27 Questions (Windows Mobile) 2 03-16-2008 03:04 AM
Move an image inside an image control Cableguy Questions (Windows Mobile) 5 05-14-2007 07:40 PM


All times are GMT. The time now is 08:32 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0