Results 1 to 27 of 27

Thread: (VB6) ColorDialog: a color dialog replacement

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    (VB6) ColorDialog: a color dialog replacement

    The Windows color dialog seems a bit outdated to me. Here is a new one that can replace it.

    The currently supported languages are: English, Spanish, Chinese, Italian, Greek, French (thanks Crapahute), German, Portuguese and Russian. Non-supported locales default to English.

    Download from GitHub.

    Some screen shots:

    Name:  ColorDialog_scr1.png
Views: 1474
Size:  120.0 KB

    Name:  ColorDialog_scr2.png
Views: 1360
Size:  91.4 KB

    Name:  ColorDialog_scr3b.png
Views: 1031
Size:  130.3 KB

    Name:  ColorDialog_scr4.png
Views: 1403
Size:  171.7 KB

    Download from GitHub.

    Help file online.

    Last release: 2022-09-12

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    It has two other controls: ColorSelector and EyeDropper that can be used independently.

    Name:  ColorControls_scr5png.png
Views: 1185
Size:  73.9 KB

    So, there are four objects:

    ColorDlg control, that is the dialog.

    ColorSelector control, that can be used on forms to offer color selections.

    EyeDropper control, that can be used to pick a color from the screen.


    And a class, that does the same as the ColorDlg but does not require a host form.

    ColorDialog class.

    You can see example uses in the test project of the download.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    The texts that need to be translated for other languages are in the mUILocalization bas module:

    Code:
            ' Microsoft teminology search: https://www.microsoft.com/en-us/language/search
        Select Case TextID
            Case cdUIT_frmColorDialog_Form_Caption ' English: "Color selection"
                Text = "Color selection"
            Case cdUIT_ColorSelector_chkFixedPalette_Caption ' English: "Fixed"
                Text = "Fixed"
            Case cdUIT_ColorSelector_chkFixedPalette_ToolTipText ' English: "Reflects color changes visually in the palette or not"
                Text = "Reflects color changes visually in the palette or not"
            Case cdUIT_ColorSelector_cboSliderParameter_ToolTipText ' English: "Slider control parameter"
                Text = "Slider control parameter"
            Case cdUIT_ColorSelector_lblMode_Caption ' English: "Mode:"
                Text = "Mode:"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Hue ' English: "Hue"
                Text = "Hue"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Luminance ' English: "Lum."
                Text = "Lum."
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Value ' English: "Value"
                Text = "Value"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Saturation ' English: "Sat."
                Text = "Sat."
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Red ' English: "Red"
                Text = "Red"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Green ' English: "Green"
                Text = "Green"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Blue ' English: "Blue"
                Text = "Blue"
            Case cdUIT_ColorSelector_cboColorSystem_ListItem_HSV ' English: "HSV"
                Text = "HSV"
            Case cdUIT_ColorSelector_cboColorSystem_ListItem_HSL ' English: "HSL"
                Text = "HSL"
            Case cdUIT_frmColorDialog_lblBasicColors_Caption ' English: "Basic colors:"
                Text = "Basic colors:"
            Case cdUIT_frmColorDialog_lblRecent_Caption ' English: "Recent:"
                Text = "Recent:"
            Case cdUIT_frmColorDialog_Color_Caption ' English: "color"
                Text = "color"
            Case cdUIT_frmColorDialog_ColorNew_Caption ' English: "new"
                Text = "new"
            Case cdUIT_frmColorDialog_ColorPrevious_Caption ' English: "previous"
                Text = "previous"
            Case cdUIT_frmColorDialog_MouseWheel_ToolTipStart ' English: "Hold down the Control key to change"
                Text = "Hold down the Control key to change"
            Case cdUIT_frmColorDialog_MouseWheel_ToolTipEnd ' English: "with the mouse wheel, press Shift key to go slowly"
                Text = "with the mouse wheel, press Shift key to go slowly"
            Case cdUIT_frmColorDialog_EyeDropper_ToolTip ' English: "Choose a color from anywhere on the screen or press the Escape key to cancel"
                Text = "Choose a color from anywhere on the screen or press the Escape key to cancel"
            Case cdUIT_frmColorDialog_picEyeDropper_ToolTipText ' English: "Choose a color from the screen"
                Text = "Choose a color from the screen"
            Case cdUIT_frmColorDialog_lblRed_Caption ' English: "Red:"
                Text = "Red:"
            Case cdUIT_frmColorDialog_lblGreen_Caption ' English: "Green:"
                Text = "Green:"
            Case cdUIT_frmColorDialog_lblBlue_Caption ' English: "Blue:"
                Text = "Blue:"
            Case cdUIT_frmColorDialog_lblHex_Caption ' English: "Hex:"
                Text = "Hex:"
            Case cdUIT_frmColorDialog_lblHue_Caption ' English: "Hue:"
                Text = "Hue:"
            Case cdUIT_frmColorDialog_lblSaturation_Caption ' English: "Sat.:"
                Text = "Sat.:"
            Case cdUIT_frmColorDialog_Luminance_Caption ' English: "Lum.:"
                Text = "Lum.:"
            Case cdUIT_frmColorDialog_Value_Caption ' English: "Value:"
                Text = "Value:"
            Case cdUIT_frmColorDialog_lblColorSystem_Caption ' English: "Mode:"
                Text = "Mode:"
            Case cdUIT_frmColorDialog_lblPalette_Caption ' English: "Palette:"
                Text = "Palette:"
            Case cdUIT_frmColorDialog_cboPalette_ListItem1 ' English: "Wheel, fixed"
                Text = "Wheel, fixed"
            Case cdUIT_frmColorDialog_cboPalette_ListItem2 ' English: "Box, fixed"
                Text = "Box, fixed"
            Case cdUIT_frmColorDialog_cboPalette_ListItem3 ' English: "Wheel, dynamic"
                Text = "Wheel, dynamic"
            Case cdUIT_frmColorDialog_cboPalette_ListItem4 ' English: "Box, dynamic"
                Text = "Box, dynamic"
            Case cdUIT_frmColorDialog_InvalidColorMessage ' English: "The color is not valid."
                Text = "The color is not valid."
            Case cdUIT_frmColorDialog_ParameterFullName_Hue ' English: "Hue"
                Text = "Hue"
            Case cdUIT_frmColorDialog_ParameterFullName_Luminance ' English: "Luminance"
                Text = "Luminance"
            Case cdUIT_frmColorDialog_ParameterFullName_Saturation ' English: "Saturation"
                Text = "Saturation"
            Case cdUIT_frmColorDialog_ParameterFullName_Red ' English: "Red"
                Text = "Red"
            Case cdUIT_frmColorDialog_ParameterFullName_Green ' English: "Green"
                Text = "Green"
            Case cdUIT_frmColorDialog_ParameterFullName_Blue ' English: "Blue"
                Text = "Blue"
            Case cdUIT_frmColorDialog_ParameterFullName_Value ' English: "Value"
                Text = "Value"
            Case cdUIT_frmColorDialog_OK ' English: "OK"
                Text = "OK"
            Case cdUIT_frmColorDialog_Cancel ' English: "Cancel"
                Text = "Cancel"
            Case cdUIT_frmColorDialog_Close ' English: "Close"
                Text = "Close"
        End Select

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Minor bug fixed.

  5. #5
    Member
    Join Date
    Mar 2020
    Posts
    33

    Re: (VB6) ColorDialog: a color dialog replacement

    Poposal for French

    Code:
        Select Case TextID
            Case cdUIT_frmColorDialog_Form_Caption
                Text = "Sélection couleur"
            Case cdUIT_ColorSelector_chkFixedPalette_Caption
                Text = "Fixe"
            Case cdUIT_ColorSelector_chkFixedPalette_ToolTipText
                Text = "Reflète visuellement les changements de couleur dans la palette ou non"
            Case cdUIT_ColorSelector_cboSliderParameter_ToolTipText
                Text = "Paramètre du control ascenseur"
            Case cdUIT_ColorSelector_lblMode_Caption
                Text = "Mode:"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Hue
                Text = "Hue"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Luminance
                Text = "Lum."
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Value
                Text = "Valeur"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Saturation
                Text = "Sat."
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Red
                Text = "Rouge"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Green
                Text = "Vert"
            Case cdUIT_ColorSelector_cboSliderParameter_ListItem_Blue
                Text = "Bleu"
            Case cdUIT_frmColorDialog_lblBasicColors_Caption
                Text = "Couleurs de base:"
            Case cdUIT_frmColorDialog_lblRecent_Caption
                Text = "Récent:"
            Case cdUIT_frmColorDialog_Color_Caption
                Text = "couleur"
            Case cdUIT_frmColorDialog_ColorNew_Caption
                Text = "nouvelle"
            Case cdUIT_frmColorDialog_ColorPrevious_Caption
                Text = "précédente"
            Case cdUIT_frmColorDialog_MouseWheel_ToolTipStart
                Text = "Maintenez la touche Control appuyée pour naviguer"
            Case cdUIT_frmColorDialog_MouseWheel_ToolTipEnd
                Text = "avec la molette de la souris, pressez Shift pour defiler doucement"
            Case cdUIT_frmColorDialog_EyeDropper_ToolTip
                Text = "Choisir une couleur n'importe-où à l'écran ou presser Échap pour annuler"
            Case cdUIT_frmColorDialog_lblRed_Caption
                Text = "Rouge:"
            Case cdUIT_frmColorDialog_lblGreen_Caption
                Text = "Vert:"
            Case cdUIT_frmColorDialog_lblBlue_Caption
                Text = "Bleu:"
            Case cdUIT_frmColorDialog_lblHex_Caption
                Text = "Hex:"
            Case cdUIT_frmColorDialog_lblHue_Caption
                Text = "Hue:"
            Case cdUIT_frmColorDialog_lblSaturation_Caption
                Text = "Sat.:"
            Case cdUIT_frmColorDialog_Luminance_Caption
                Text = "Lum.:"
            Case cdUIT_frmColorDialog_Value_Caption
                Text = "Valeur:"
            Case cdUIT_frmColorDialog_lblColorSystem_Caption
                Text = "Mode:"
            Case cdUIT_frmColorDialog_lblPalette_Caption
                Text = "Palette:"
            Case cdUIT_frmColorDialog_cboPalette_ListItem1
                Text = "Molette, fixe"
            Case cdUIT_frmColorDialog_cboPalette_ListItem2
                Text = "Boite, fixe"
            Case cdUIT_frmColorDialog_cboPalette_ListItem3
                Text = "Molette, dynamique"
            Case cdUIT_frmColorDialog_cboPalette_ListItem4
                Text = "Boite, dynamique"
            Case cdUIT_frmColorDialog_InvalidColorMessage
                Text = "La couleur n'est pas valide."
            Case cdUIT_frmColorDialog_ParameterFullName_Hue
                Text = "Hue"
            Case cdUIT_frmColorDialog_ParameterFullName_Luminance
                Text = "Luminance"
            Case cdUIT_frmColorDialog_ParameterFullName_Saturation
                Text = "Saturation"
            Case cdUIT_frmColorDialog_ParameterFullName_Red
                Text = "Rouge"
            Case cdUIT_frmColorDialog_ParameterFullName_Green
                Text = "Vert"
            Case cdUIT_frmColorDialog_ParameterFullName_Blue
                Text = "Bleu"
            Case cdUIT_frmColorDialog_ParameterFullName_Value
                Text = "Valeur"
        End Select

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: (VB6) ColorDialog: a color dialog replacement

    To be done correctly (multi-lingual), the control would need to make a call to the GetUserDefaultUILanguage API, and adjust accordingly. But I suspect Eduardo knows that.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by Crapahute View Post
    Poposal for French
    Thanks you! Added the French translation.

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by Elroy View Post
    To be done correctly (multi-lingual), the control would need to make a call to the GetUserDefaultUILanguage API, and adjust accordingly. But I suspect Eduardo knows that.
    Yes, I used that API.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Update released: added Unicode support for captions and Chinese language.
    Also several improvements and bug fixes.

    Name:  ColorControls_scr6.png
Views: 1083
Size:  120.1 KB

    If you are native Chinese please take a look specially to the longer phrases and report any error, thanks.

  10. #10
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    673

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by Eduardo- View Post
    Update released: added Unicode support for captions and Chinese language.
    Also several improvements and bug fixes.

    Name:  ColorControls_scr6.png
Views: 1083
Size:  120.1 KB

    If you are native Chinese please take a look specially to the longer phrases and report any error, thanks.
    Public Sub SetCompact(Optional RecentColorsColumns As Long = 0, Optional ColorValuesSectionVisible As Boolean = False, Optional SliderOptionsAvailable As CDSliderOptionsAvailableConstants = cdSliderOptionsNone, Optional nDialogCaptionVisible As Boolean = True, Optional nConfirmationButtonsVisible As Boolean = True, Optional nColorSelectionBoxVisible As Boolean = True, Optional nSliderWide As CDYesNoAutoConstants = cdYNAuto, Optional nHideLabels As Boolean = False)
    mDlg.SetCompact RecentColorsColumns, ColorValuesSectionVisible, SliderOptionsAvailable, nDialogCaptionVisible, nConfirmationButtonsVisible, nColorSelectionBoxVisible, nSliderWide, nHideLabels
    End Sub


    Microsoft Visual Basic
    Compile Error:

    Circular correlation between modules
    OK help

    Similar problems elsewhere

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by xxdoc123 View Post
    Circular correlation between modules
    OK help

    Similar problems elsewhere
    Did you make any change? Do you have SP6 installed?
    Try closing the IDE and opening the project group again. Did still happen?
    Anyone else experience the issue?

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Please check now.

  13. #13
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    673

    Re: (VB6) ColorDialog: a color dialog replacement

    some test OK! I Will test later

  14. #14
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    506

    Re: (VB6) ColorDialog: a color dialog replacement

    good job work perfect

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Added Italian and Greek, and some minor adjustments/fixes.

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Added German and fixed a bug in tool tips.

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Added Portuguese and Russian translations.

  18. #18
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    673

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by xxdoc123 View Post
    Public Sub SetCompact(Optional RecentColorsColumns As Long = 0, Optional ColorValuesSectionVisible As Boolean = False, Optional SliderOptionsAvailable As CDSliderOptionsAvailableConstants = cdSliderOptionsNone, Optional nDialogCaptionVisible As Boolean = True, Optional nConfirmationButtonsVisible As Boolean = True, Optional nColorSelectionBoxVisible As Boolean = True, Optional nSliderWide As CDYesNoAutoConstants = cdYNAuto, Optional nHideLabels As Boolean = False)
    mDlg.SetCompact RecentColorsColumns, ColorValuesSectionVisible, SliderOptionsAvailable, nDialogCaptionVisible, nConfirmationButtonsVisible, nColorSelectionBoxVisible, nSliderWide, nHideLabels
    End Sub


    Microsoft Visual Basic
    Compile Error:

    Circular correlation between modules
    OK help

    Similar problems elsewhere
    i may found why have this error

    ---------------------------
    Microsoft Visual Basic
    ---------------------------
    模块之间循环相关
    ---------------------------
    确定 帮助
    ---------------------------

    ColorControlsConstants.CLS contains custom enumeration types that are referenced in user controls. An error will occur. . . And the ide is just a prompt, it doesn't show which line of code is wrong,If modified to .BAS module. Can't use custom enum variables




    why do i have this problem ,how can fixed?

    cannot reference OLEGuids.tlb

    Reference=*\G{5B1EACE0-EDEB-11E1-AFF1-0800200C9A66}#1.0#0#OLEGuids\OLEGuids.tlb#OLE Guid and interface definitions

    NOW WORK OK...

    Another problem is that the ocx version cannot be registered. and include your new version of bsprintER.OCX
    Last edited by xxdoc123; Sep 13th, 2022 at 04:34 AM.

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by xxdoc123 View Post
    If modified to .BAS module. Can't use custom enum variables
    Of course, that's why I put them in a class module. They need to be public (to be used outside the ocx).

    Quote Originally Posted by xxdoc123 View Post
    why do i have this problem ,how can fixed?

    cannot reference OLEGuids.tlb

    Reference=*\G{5B1EACE0-EDEB-11E1-AFF1-0800200C9A66}#1.0#0#OLEGuids\OLEGuids.tlb#OLE Guid and interface definitions

    NOW WORK OK...
    You must have another version registered of OLEGuids.tlb
    Well, I unticked from References OLEGuids, and I started to get all the problem that you say of "circular references".
    The version that I used of Krool controls is not the latest, I used a version where already had those controls separated, that were the ones I needed also here, so the version of OLEGuids.tlb is not the latest either.

    Quote Originally Posted by xxdoc123 View Post
    Another problem is that the ocx version cannot be registered. and include your new version of bsprintER.OCX
    I cannot find any kind of reference to BSPrinter in the entire project.
    Further on, I unregistered BSPrint10.ocx in my machine, and I could use ClrCtrl2.ocx with no issue.
    Where do you see a reference to BSPrinter?

  20. #20

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    As I said, there is no reference to BSPrinter anywhere.

    The reason why you cannot register the OCX might be because you made some compilation and deleted the OCX file, but didn't unregister it first.

    I updated the project now, there are two test projects, one for compiled and one for source code.
    I also added a couple of bat files to register and unregister the OCX easily.

    For your current issue, maybe you'll have to clean the registry manually (if you don't have the deleted OCX any more to unregister it).

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    I checked and the OLEGuids.tlb file that I'm using is the latest available already.

    This happens because you have the OLEGuids.tlb typelid registered and it is in some particular folder, but VB looks for it in Windows/System (Windows/SysWOW64) and can't find it.

    If yuo open the References window you'll see:

    Name:  OGMissing.png
Views: 847
Size:  50.9 KB

    You need to untick that and to navigate to where you actually have the file and select it.

    Or to avoid such issues use the compiled ocx.

  22. #22

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Changed the location of OLEGuids.tlb, now it is expected to be under Windows / System (SysWOW64).
    To avoid the problem that some have been experiencing.

    (It applies just for the source code project, but it does not apply if you use the OCX already compiled).

  23. #23
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: (VB6) ColorDialog: a color dialog replacement

    Really rather good and useful too.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  24. #24
    Member
    Join Date
    Mar 2022
    Posts
    38

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by Eduardo- View Post
    You can see example uses in the test project of the download.
    I downloaded the test project and was playing around. The first thing I noticed is that the "cross hairs" that show where you are in the color circle disappears if I hold the left mouse button down and drag around the circle.

    It *does* appear to follow the mouse around and change the color, but the cross hairs don't get redrawn until I let go of the mouse button.

    Just letting you know... otherwise, another very cool control. Hopefully I'll drop it into my project shortly.

    Thanks!

  25. #25

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    That behavior was on purpose, copied from the standard Windows color dialog.
    I think the idea was that if you have the mouse pressed, you can see what color you are pointing by the mouse pointer.
    Anyway I changed it to be always visible to match the new color dialog that comes with Paint in Windows 11.
    I also added a new property "PointerType" with the option to be a circle or cross-hair, now the circle is the default, similar to Windows 11 Paint's color dialog.

    Name:  ColorDialog5.png
Views: 480
Size:  121.2 KB

  26. #26
    Member
    Join Date
    Mar 2022
    Posts
    38

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by Eduardo- View Post
    That behavior was on purpose, copied from the standard Windows color dialog.
    I think the idea was that if you have the mouse pressed, you can see what color you are pointing by the mouse pointer.
    Anyway I changed it to be always visible to match the new color dialog that comes with Paint in Windows 11.
    I also added a new property "PointerType" with the option to be a circle or cross-hair, now the circle is the default, similar to Windows 11 Paint's color dialog.
    Very nice! I'll download the update and try it out!

    While I have you, is there a way to get the "themed" command buttons (just like the ones at the bottom of the dialog) into my VB6 project? It would be neat to modernize my app a little with these.

  27. #27

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: (VB6) ColorDialog: a color dialog replacement

    Quote Originally Posted by BooksRUs View Post
    Very nice! I'll download the update and try it out!

    While I have you, is there a way to get the "themed" command buttons (just like the ones at the bottom of the dialog) into my VB6 project? It would be neat to modernize my app a little with these.
    Yes, of course, you need to add a manifest to the exe file as resource #24.

    The manifest have to include these lines:

    Code:
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                language="*"
                processorArchitecture="x86"
                publicKeyToken="6595b64144ccf1df"
            />
        </dependentAssembly>
    </dependency>
    You can search the forum about how to do this or post a question in the general section for recommendations, since there are several ways to deal with it.

    Or just include the file attached as resource file.
    You'll need to compile the program to see the themed commandbuttons, unless you want to also add the manifest to the VB6.exe.
    Attached Files Attached Files

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