Hi Jaeden,
Thanks for your explanation of what you are trying to do. I suspect you have more experience in programming than me, but I have spent a lot of time playing around with GDI+ graphics so perhaps I can offer a few ideas for what they are worth.
1. First of all, in GDI+ you can draw anything to a bitmap in memory. For example:
Dim bmp As Bitmap
Using g As Graphics = Graphics.FromImage(bmp)
g.DrawImage... and so on
End Using
Then of course you can use the Paint event or the OnPaint method to copy the bitmap to the screen.
2. Some Windows Forms controls, among them ProgressBar, have a DrawToBitmap method which copies the control surface straight into a bitmap. You might find this useful.
3. I can think of several ways to draw contrasting text. For example, you could define a GraphicsPath and use the AddString method to draw the string. Then loop through the path's PathPoints, connecting up the dots with ControlPaint.DrawReversibleLine. My experience with this is that it is complicated, extremely slow and the result is illegible [appropriate smiley].
4. I think the best way to get the effect you want is to use clipping. For example, calculate a clipping rectangle from the ProgressBar's value, width and height. Set the Graphics.Clip to the blue area and draw the text on it in white. Then set the clip the white area, and draw the same text over it in black. Perfect, isn't it? (I hope so, I haven't tried it!)
5. A final note. Results in GDI+ are affected by several graphics properties. The ones you might want to use here are:
PixelOffsetMode = Drawing2D.PixelOffsetMode.HighQuality
SmoothingMode = Drawing2D.SmoothingMode.HighQuality
For any image which changes rapidly, use Form.DoubleBuffered=True (much easier than SetStyles). Probably it won't matter for the small area of the progress bar.
All the best, Vic