You can use a timer and generate a random value and set it to the slide in the WM_TIMER message handler. I think the Control Metrics example that ships with Measurement Studio for Visual C++ behaves similar to what you describe and that's what it does. Check it out under the Examples\UI\Common\Control Metrics subdirectory of your Measurement Studio for Visual C++ installation directory.
- Elton