|
-
March 15th, 2001, 01:13 PM
#1
Load images from an external res file or dll?
Is it possible to load images from an external res file or a dll in VB?
-
March 15th, 2001, 05:30 PM
#2
Re: Load images from an external res file or dll?
i haven't done it with a dll, but i have with a .res file.
here's an example:
'theres a resource file setup already with icons and such
Const ICON_CHECK as Integer = 23
ImageList1.ListImages.Add , , LoadResPicture(ICON_CHECK, vbResIcon)
that's it.
hope this helps,
john
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
March 15th, 2001, 06:40 PM
#3
Re: Load images from an external res file or dll?
Is there a way to load these images without compiling the res file. I want to load images but don't want to make the compiled program to be too large.
-
March 15th, 2001, 08:49 PM
#4
Re: Load images from an external res file or dll?
A earlier post of yours suggested the use of Dlls or .Res files. If you can get the images into a .DLL file, then you can use the ExtractAssociatedIcon API to retrieve them
' The Declare
Declare Function ExtractAssociatedIcon Lib "Shell32.DLL" Alias "ExtractAssociatedIconA" (byval hInst as Long, byval lpIconPath as string, lpiIcon as Long) as Long
' A sample
DisplayChangeIconDialog = ExtractAssociatedIcon(App.hInstance, fn, IconIndex) ' Extract the icon
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|