I\'d like to draw a progress bar with percentage in its center, but I\'d like the text to have negative (contrasted) color of the
You can use XOR to calculate the negative (inverted) color;
Public Function InvertColor(color As Long) As Long
Return (color Xor &HFFFFFF)
End Function
What you're doing is fine. Old tricks like SetROP2() don't work anymore with text getting anti-aliased, especially with ClearType rendering. Getting the aliasing pixels with the wrong color is very noticeable. Graphics.CompositingMode accordingly doesn't support the effects anymore.