Results 1 to 31 of 31

Thread: [vb6] Fix Palette when IDE Manifested - AddIn

Threaded View

  1. #1

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    [vb6] Fix Palette when IDE Manifested - AddIn

    This is just a simple add-in to fix the popup palette in the IDE when the IDE is manifested for common controls, i.e., themed.

    Updated 2 Aug 2020. Added ability for elevated IDE to receive dragged files from Windows Explorer. Most of us run the IDE elevated. That prevents us from dragging files from Explorer to our Project Window tree (as of Win8). With a few lines of code, no subclassing, that is now re-enabled. I simply added those lines of code to the add-in. Won't break binary compatibility with previous version. Won't step on some other add-in that may do the same thing. The fix is applied whether or not the IDE is manifested for common controls.

    Leandro has a similar project that offers other features. However, this add-in simply restores the palette to how it would look if IDE were not manifested, no modifications. Personally, I just wanted the palette back but didn't want any extra options.

    Quickly, how it works. When manifested, extra messages are sent and among them is WM_ERASEBKGND. Since the palette is drawn vs some image control, that message is part of the reason the palette is being erased. The add-in will find the popup palette, subclass it, eat that extra message and trigger a refresh. To prevent sending excessive refresh messages, the subclassing will only perform those tasks when the palette is shown, not the system colors. The entire add-in is just a couple dozen lines of code, so code comments are sparse.

    Recommend compiling the add-in into the same folder as your VB executable.

    With decades of coding under my belt, this is the first add-in that I've ever created. So, if something is wrong or it doesn't work in a specific scenario, please post the problem.

    As you can see from the controls in this screenshot, the IDE is manifested and the palette is restored.

    Name:  Screenshot.jpg
Views: 2225
Size:  41.3 KB

    If you are going to recompile the add-in, you first need to remove it from the IDE, otherwise, you'll likely get access-denied errors. To do that, close all VB instances except the one you are using for recompiling the add-in. Open the Add-In manager from your IDE menu bar. Select the add-in, ensure all checkboxes at bottom of window are unchecked. Close that manager window & recompile. When done, simply go back and check the boxes you unchecked earlier.

    Edited: A few people had problems compiling the add-in DLL. If so, remove binary compatibility requirement as shown in post #18 below. And if that is done, you can delete the ManifestPalFix.binaryCompat file in the zip.
    Attached Files Attached Files
    Last edited by LaVolpe; Aug 9th, 2020 at 01:11 PM. Reason: updated version
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

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



Click Here to Expand Forum to Full Width