These functions can be used to get pictures for your program at runtime e.g. a PictureBox, Image, Form icon etc. (Taken from AllenOCX)
Code:
|
'General
Declarations: Private Type
CLSID Private Const
MAX_PATH = 260 Private Declare
Function OleCreatePictureIndirect Lib
"oleaut32.dll" (pDicDesc As
TypeIcon, riid As
CLSID, ByVal
fown As Long,
lpUnk As Object)
As Long Private Const
SHGFI_ICON = &H100 ' Convert an icon
handle into an IPictureDisp.
With new_icon 'Icon function SHGetFileInfo FileName,
0, sh_info, _ 'Use these functions
for the program e.g. Picture1.Picture = GetBigIcon("C:\Autoexec.bat") Public Function
GetBigIcon(FileName As
String) As
IPictureDisp |
| From: | Rudy Ocol |
| Date: | Sunday, November 16, 2003 at 17:46:43 |
| Comments: | How can I copy a picture file from Windows Explorer and paste it into a picture box of a VB6 application and save the picture at the same time to a table of a MS Access file. The picture box is bound to the table. |