Posted to microsoft.public.excel.programming
|
|
For Robin Hammond
Jamie,
Nice one. There's a new version up on my site now with the fancy coloured
bar.
http://www.enhanceddatasystems.com/E...rogressBar.htm
Robin Hammond
www.enhanceddatasystems.com
"onedaywhen" wrote in message
om...
Your current approach is to have a static white textbox in the
background and a colored textbox in the foreground which progressively
increases in width while retaining its Left value.
To get the desired effect, create a bitmap (e.g. a picture using
Paint) with the dithered colors you want to use. Put the bitmap into
an Image control and use this as your static background. Use a
completely white Image control as the foreground. To show progress,
decrease the white Image's Width property while increasing its Left
value i.e.
With frmProgress.txtProgFore
.Width = 200 - Int(nWidth * 2)
.Left = 12 + Int(nWidth * 2)
End With
This will look as if the background Image is increasing in width.
BTW I generated the dithered colors using a VB6 form:
Private Sub Form_Activate()
Dither Me
End Sub
Private Sub Dither(vForm As Form)
Dim intLoop As Integer
vForm.DrawStyle = vbInsideSolid
vForm.DrawMode = vbCopyPen
vForm.ScaleMode = vbPixels
vForm.DrawWidth = 2
vForm.ScaleHeight = 256
For intLoop = 0 To 255
vForm.Line (0, intLoop)-(Screen.Width, intLoop - 1), _
RGB(255 - intLoop, 0, 0 + intLoop), B
Next intLoop
End Sub
--
"Robin Hammond" wrote in message
...
Nigel,
there's a newer version up on the site. I even tweaked it so that the
colour
of the bar starts off red and gets progressively more blue as you move
further across to get away from local machine colour settings
(unfortunately
for the whole bar, but if anyone can tweak this to be red at the start
and
blue at the end I'd be intrigued).
http://www.enhanceddatasystems.com/E...rogressBar.htm
Robin Hammond
www.enhanceddatasystems.com
|