Anyone know how to get a progress bar in a statusbar like in Internet Explorer?
Printable View
Anyone know how to get a progress bar in a statusbar like in Internet Explorer?
Add a Statusbar and a Progress bar..
Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
'form load...
SetParent ProgressBar1.hwnd, StatusBar1.hwnd
With StatusBar1
Progressbar1.Move 30, 50, .Panels(1).width - 30, .height - 65
End With
VBBrowser v2.2.1
Cool, thanks geoff :D
Is there any way I can do this with 2 progressbars in the same statusbar? I tried this:
But it only works for the first progressbar.Code:Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
SetParent prgListProgress.hWnd, sbrStatus.hWnd
With sbrStatus
prgListProgress.Move 30, 50, .Panels(1).Width - 30, .Height - 65
End With
SetParent prgProgress.hWnd, sbrStatus.hWnd
With sbrStatus
prgProgress.Move 30, 50, .Panels(2).Width - 30, .Height - 65
End With
End Sub
Actually, I just noticed that it's putting both progressbars into panel 1, so is there anyway to tell it what panel it should be in?
Nevermind, figured it out. Just had to use .Panels(2).Left. :o
Draco,
Would you mind posting the code you used to get 2 progressBars in the statusBar?
Thanks.:)
No prob. :)
First put 2 progressbars and a statusbar on the form (as previously mentioned), with 2 panels in the statusbar (just stating the obvious :)).
Code:Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
SetParent prgListProgress.hWnd, sbrStatus.hWnd
With sbrStatus
prgListProgress.Move .Panels(1).Left, 50, .Panels(1).Width - 30, .Height - 65
End With
SetParent prgProgress.hWnd, sbrStatus.hWnd
With sbrStatus
prgProgress.Move .Panels(2).Left, 50, .Panels(2).Width - 30, .Height - 65
End With
End Sub
Thanks !!
I was close, but not close enough to get it to work right.:p
How do you get this to work with an MDI Parent?