I set the BackColor and ForeColor of the PictureBox to something like White and Blue. Then I use the Scale property to set the range of the progress bar (equivalent to the Max property of the scrollbar) like:
picture.scale (0,0)-(maxVal,1)
if the progress bar is horizontal, otherwise
picture.scale (0,0)-(1,maxVal)
And then in the picture Paint event:
Picture.Line (0, 0)-(pValue, 1), , BF
(horizontal) where pValue is the current progress value.
This is the concept. Playing with the paint event, it is possible to get other fancy effects. I wrapped all the code in a nice class, so that I can add more properties as needed.
Marco
|