PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Extract toolboxbitmap [NOT RESOLVED]-VBForums
Results 1 to 10 of 10

Thread: Extract toolboxbitmap [NOT RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425

    Question Extract toolboxbitmap [NOT RESOLVED]

    Hello,

    Is it possible to extract the ToolboxBitmap from a ActiveX Usercontrol? I've searched this forum, but I can only find how to extract a icon from a normal EXE. The Usercontrol uses a bitmap and not an Icon.

    My goal is to check the OCX file for the 'icon' / 'bitmap' and extract this to the temporary folder. Next I will load this icon into a menu. This all is no problem, with normal EXE of DLL, but I can't seem to get it to work with a Usercontrol OCX.

    Can anybody help me out here?

    Also posted: http://www.vbforums.com/showthread.p...Extract+Bitmap
    Last edited by BShadow; Mar 17th, 2004 at 03:32 AM.
    "Experience is something you don't get until just after you need it."

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425

    Question

    *BUMP*
    "Experience is something you don't get until just after you need it."

  3. #3
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    You could search www.download.com for a resource editor.
    The icon has to be hidden inside the OCX somewhere as a resource..

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    Thank you for your reply

    It's not an Icon and therefore cannot be found as one ... And I don't want a third party software application to do it, I want MY app to do it, because it must retreive the icons of the 3rd app and place it in a menu...
    "Experience is something you don't get until just after you need it."

  5. #5
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,092
    That info is stored in the registry under HKCR\Clsid\YourClsID\ToolboxBitmap32

    The default value is the file name for the icon, and the offset index for it. You can use ExtractIcon to get it out of the file.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    Originally posted by crptcblade
    That info is stored in the registry under HKCR\Clsid\YourClsID\ToolboxBitmap32

    The default value is the file name for the icon, and the offset index for it. You can use ExtractIcon to get it out of the file.
    Thank you. However, this doens't seem possible with the ExtractIcon API. I have tried this, but this returns empty unfortunately. When I tried to do this on a exe it gave back the ICON, but when I tried this on a UserControl with a toolboxbitmap, it returned empty I though this was empty because it is a toolboxbitmap and not an icon???
    "Experience is something you don't get until just after you need it."

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425

    Unhappy

    *BUMP*
    "Experience is something you don't get until just after you need it."

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425

    Question

    *BUMP*
    "Experience is something you don't get until just after you need it."

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    *BUMP*
    "Experience is something you don't get until just after you need it."

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    I've programmed around the problem... I've put teh bmp in the resourcefile of the UserControl and gave the usercontrol a new function:

    VB Code:
    1. Public Function GetIcon() As IPictureDisp
    2.     Set GetIcon = LoadResPicture("ICON", vbResBitmap)
    3. End Function
    This is the only way I can think of at the moment... The main problem is still unresolved unfortunately
    "Experience is something you don't get until just after you need it."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width