LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving icon from resource

Hi all,

I'm trying to retreive an icon from the resource section of user32.dll, but I don't know how I would code that in LV 7.0.  Any ideas?


Adrian
0 Kudos
Message 1 of 13
(4,134 Views)

Hey!

I'm not exactly sure about what you trying to perform, but:

If it is possible to retrieve an icon from user32.dll methods or properties, just use a call library function node in LabVIEW to access the DLL and get the icon information. Depending on the information (datatyp, structure, ...) and depending an what you want to do with it (save it, use it in LV) you maybe have to use other functions to convert the date in the required format.

BR, Chrisitan

0 Kudos
Message 2 of 13
(4,111 Views)
Hi,
try the Freeware tool ResHack, it supports command line scripting. So you can get access via the ShellExecute.
greets, Dave
Greets, Dave
0 Kudos
Message 3 of 13
(4,103 Views)


@daveTW wrote:
Hi,
try the Freeware tool ResHack, it supports command line scripting. So you can get access via the ShellExecute.
greets, Dave


Thanks dave, but I'd like to load it in programaticly so if the icon is changed in the next revision of windows, the new look of the application will be consistent with that OS.


Adrian
0 Kudos
Message 4 of 13
(4,084 Views)


@Christian_M wrote:

Hey!

I'm not exactly sure about what you trying to perform, but:

If it is possible to retrieve an icon from user32.dll methods or properties, just use a call library function node in LabVIEW to access the DLL and get the icon information. Depending on the information (datatyp, structure, ...) and depending an what you want to do with it (save it, use it in LV) you maybe have to use other functions to convert the date in the required format.

BR, Chrisitan



Hi Christian,

I've had difficulty with just getting icons from within C/C++, never mind LV.  Does anyone have a code snippet that they would like to share?  If so, please save it as a LV 7.0 file, we haven't upgraded yet.

Thanks a lot everyone.


Adrian

0 Kudos
Message 5 of 13
(4,082 Views)
Oh, just to let eveyone know what I am attempting to do, I'd like to load in an icon from the user32.dll file and programaticly get it to show up on a button when in the 'true' state.

Anyone every attempt this before?

Thanks,


Adrian
0 Kudos
Message 6 of 13
(4,080 Views)

Hey!

If you could provide me with a little bit of information of which function to call and which parameters to set please.

BR, Christian

0 Kudos
Message 7 of 13
(4,073 Views)

@Christian_M wrote:

Hey!

If you could provide me with a little bit of information of which function to call and which parameters to set please.

BR, Christian




That is what I'm trying to find out. 😞


Adrian
0 Kudos
Message 8 of 13
(4,027 Views)
Hi,
as I wrote in my last post, there is a way to get access to icon ressources via ResHacker. Additionally it is necessary to have IrfanView (Freeware) installed. If this is done, ResHacker.exe has to be in the same directory as the LLB. Then it should work.
greets, Dave
Greets, Dave
0 Kudos
Message 9 of 13
(3,954 Views)


@daveTW wrote:
Hi,
as I wrote in my last post, there is a way to get access to icon ressources via ResHacker. Additionally it is necessary to have IrfanView (Freeware) installed. If this is done, ResHacker.exe has to be in the same directory as the LLB. Then it should work.
greets, Dave


Ah, great.  I looked at the web page and didn't see any reference to LV so I figured you were saying to use that app to capture the icon and then paste it in to my app.

Thanks for the help.  I'll look into the .llb.


Adrian
0 Kudos
Message 10 of 13
(3,913 Views)