I'm trying to update an old VB6 program and I came across this line
frmMain.Command1(X).BackColor = &H8000000F
When trying to convert this to C# I came up with
this.Command1[X].BackColor = System.Drawing.ColorTranslator.FromOle(0x8000000f);
This doesn't seem to work as the hex number is too large for .FromOle as it takes an int, but this number is too large for an int. Do you have any suggestions on other ways that I can do this or get around this?
Thanks
&H8000000F
is the button face color, and in C# :
this.Command1[X].BackColor = SystemColors.ButtonFace
User contributions licensed under CC BY-SA 3.0