If you want to show a progressbar inside a statusbar panel, you could use the following code !
GeSHi (vb):
Public Function AttachProgBar(pb As ProgressBar, _
Status As StatusBar, _
Panel As Integer)
Dim defProgBarHwnd As Long
defProgBarHwnd = SetParent(pb.hwnd, Status.hwnd)
With Status
.Align = vbAlignTop
.Visible = False
With pb
.Visible = False
.Align = vbAlignNone
.Width = Status.Panels(Panel).Width
.Move (Status.Panels(Panel).Left), (Status.Top + 30), (Status.Panels(Panel).Width - 50), (Status.Height - (50))
.Visible = True
.ZOrder 0
End With
.Align = vbAlignBottom
.Visible = True
End With
End Function
Created by GeSHI 1.0.7.20
Paste the above code into a module of from and add a progressbar and a statusbar to the form.
Usage:
GeSHi (vb):
Private Sub Form_Load()
AttachProgBar ProgressBar1, Status1, 2
End Sub
Created by GeSHI 1.0.7.20
This will add the progressbar into the 2nd panel of the statusbar.