Modeless Progress Bar Help
hi
im just been browsing the internet for modeless prograss bar like the one in my documents (See Photo)
http://i38.tinypic.com/2gugsn6.jpg
i want to create my progress bar like that through a combobox search for my application can anyone help me
thanks
pillhead2007
Re: Modeless Progress Bar Help
This is from the top of my head, but you could override the paint process of the combobox, so that the background will be painted every time 1% is completed.
Re: Modeless Progress Bar Help
I'm afraid that it's not going to be simple. The ComboBox doesn't support custom drawing. I think you'd have to use some involved API calls, exactly which I don't know.
Re: Modeless Progress Bar Help
But, can't you just repaint the background of the CB?
Re: Modeless Progress Bar Help
Quote:
Originally Posted by
tassa
But, can't you just repaint the background of the CB?
The ComboBox.Paint event is hidden from the designer because it's not supported. I just tried this:
vb.net Code:
Public Class ComboBoxEx
Inherits ComboBox
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
e.Graphics.DrawRectangle(Pens.Blue, 0, 0, 25, 25)
End Sub
Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaintBackground(pevent)
pevent.Graphics.DrawRectangle(Pens.Red, 0, 0, 25, 25)
End Sub
End Class
and placed an instance on a form and saw no blue or red square. As I said:
Quote:
The ComboBox doesn't support custom drawing.
Re: Modeless Progress Bar Help
so if you do come across this way of modeless progress bar like that one there for a combobox please update thread and thanks for the info thanks