web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Accessing Dynamics GP Colors for a Windows Form

(0) ShareShare
ReportReport
Posted on by 411

Is there a way to access (or assign) a component a color from the Dynamics GP pallet of colors? I have a windows form that inherits DexUIForm and includes the dexDefaultColorsProvider component. I have added a panel to the form and would like to assign the background color to match one of the GP colors. There is no Dexterity section in the properties of the Panel. Is there a way in code to pull a color from the GP color provider?

Categories:
I have the same question (0)
  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,065 Most Valuable Professional on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    Hi Craig

    Note this will only work for a customer with GP Power Tools build 29 (once it has been released).

    Please contact me using the Contact Us page on https://www.winthropdc.com/contact.htm

    David

  • Craig Fuller Profile Picture
    411 on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    Yes sir, that would be great!

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,065 Most Valuable Professional on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    If you want to test out the functions. I can provide a link to the Build 29 beta code that as of today now contains those functions.

  • Craig Fuller Profile Picture
    411 on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    Wow. Thank you David for those new functions and for all the other tools and knowledge you continue to share.

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,065 Most Valuable Professional on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    Hi Craig

    So....

    I confirmed that it is not possible to get the colours currently in use from Dexterity.  It only has the ability to set the colours for the colour themes and not to get them.

    However, in most cases, the custom colours are because the site has GP Power Tools installed.

    So I have added two functions specifically so that you can get the colours currently in use by GP Power Tools. 

    Added MBS_CompanyColorGet and MBS_CompanyColorGetRGB functions which can be by VSTools applications to get the current company colours being used as numeric values or RGB values.

    These functions will be in the upcoming Build 29 and can be accessed by adding a reference to the Application.GpPowerTools.dll Dictionary Assembly.

    Regards

    David

  • Verified answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,065 Most Valuable Professional on at
    RE: Accessing Dynamics GP Colors for a Windows Form

    Hi Craig

    GP Power Tools has the ability to change the colours of Dexterity windows on a per company basis as part of the Administrator Tools module.

    I know that VSTools Winforms don't match the colours used by GP once GP Power Tools changes the colours.

    I am working on a new build of GP Power Tools at the moment, it might be possible to add an API for you to get the colours (RGB) so you can update your window and controls to match.

    Even without an API, pass through Dexterity should be able to get the values. However, passing the values back to VSTools requires some tricks to pass the values back and forth as string variables.

    I like the idea of an API for you to get the current colours that you can call when you open a Winform window. I will see about adding it to the upcoming Build 29 release.

    Regards

    David

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,258

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 949 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 631 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans