At 12/2/2003  01:27 AM, Steve Pick wrote:
Oh dear. I tried so much to get this to work, mucking about with classes and
stuff and I couldn't figure out how. Best way I found is to paint your own
damn rectangle using a Graphic object :) I realise that's not ideal, but
it's the best solution I've got i'm afraid. I'd be interested as well if
anyone can enlighten me on how to do coloured progress bars.

Steve

Steve and others,

I have been wanting to do this forever myself but never was able to ... until today!!!

I figured out a way to do it and its rather simple.  You need to use SendMessage though but it works.

Here is the answer:

$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color);


To make my ProgressBar red I used the following:

        Win32::GUI::SendMessage($Progress, 0x400 + 9, 0, hex('0000FF'));


I hope this helps.


Jonathan
========================
Jonathan Southwick
jonathan.southwick@allegheny.edu
Technical & Network Services
Allegheny College
Meadville, PA 16335
(814) 332-2755