Wednesday, March 10, 2021

Convert HexaDecimal value to decimal in d365Fo using X++

 Convert HexaDecimal value to decimal in d365Fo using X++.


Check below code:

{

        int R, G, B;

        str      colorStr = '#00FF00';

        R = hex2int(substr(colorStr,2,2));

        G = hex2int(substr(colorStr,4,2));

        B = hex2int(substr(colorStr,6,2));

 

        info(strFmt('%1',WinAPI::RGB2int(R,G,B)));

        info(strFmt('%1',WinAPI::RGB2int(0,255,0)));

}

Keep Daxing!!

No comments:

Post a Comment