Hey all,
does anyone know how to go about using an image to 'fill' a progress bar instead of the stock standard green thing? I would also greatly appreciate a solution to using and image as the background of a progress bar aswell!
Thanks,
Josh
Printable View
Hey all,
does anyone know how to go about using an image to 'fill' a progress bar instead of the stock standard green thing? I would also greatly appreciate a solution to using and image as the background of a progress bar aswell!
Thanks,
Josh
Wonder on over to Code Project for a nice progressbar that does allow among other things a background image. Build the project then add the control to your toolbox
To try it out place the control on a form, add a timer, use the code below which does an never-ending demo with text displayed in the control showing percent done.
Very easy to configure the UI in the IDE too.Code:Public Class Form1
Private CurrentPosition As Integer = 0
Private PositionValue As Integer = -1
Private Sub Form1_Load() Handles MyBase.Load
CurrentPosition = Progressbar1.Position
End Sub
Private Sub Timer1_Tick() Handles Timer1.Tick
If CurrentPosition = Progressbar1.PositionMax Then
PositionValue = -1
Else
If CurrentPosition = Progressbar1.PositionMin Then
PositionValue = 1
End If
End If
CurrentPosition += PositionValue
Progressbar1.Text = String.Concat(CurrentPosition.ToString(), " percent done")
Progressbar1.Position = CurrentPosition
End Sub
Private Sub Button1_Click() Handles Button1.Click
Timer1.Enabled = Not Timer1.Enabled
End Sub
End Class
http://www.codeproject.com/KB/cpp/XpProgressBar.aspx
I have seen this, but as the name states 'XP' I was sceptical about whether it would work on Vista and Win7?
Josh
Thanks! The only reason I thought this might not work is the demo program didn't do anything, aswell as the new Aero and visual display effects differs from XP to Vista/7 but if it works in Vista it should theoretically work in Win7!
Thanks again,
Josh