Title | Display a progress bar inside a status bar on an MDI form |
Description | This example shows how to display a progress bar inside a status bar on an MDI form in Visual Basic 6. The program includes a PictureBox on thue MDI parent and places other controls inside the PictureBox. |
Keywords | ProgressBar, progress bar, StatusBar, status bar, MDI |
Categories | Tips and Tricks, Controls |
|
' Resize the panels inside.
Private Sub picStatus_Resize()
Const GAP = 30
Dim hgt As Single
hgt = picStatus.Height - 2.5 * GAP
' Panel3 and time label.
picPanel3.Move _
picStatus.ScaleWidth - GAP - picPanel3.Width, _
GAP, picPanel3.Width, hgt
lblTime.Move 0, _
(picPanel3.ScaleHeight - lblTime.Height) / 2, _
picPanel3.ScaleWidth
' Panel2 and progress bar.
picPanel2.Move _
picPanel3.Left - GAP - picPanel2.Width, _
GAP, picPanel2.Width, hgt
pbTaskProgress.Move 0, 0, _
picPanel2.ScaleWidth, picPanel2.ScaleHeight
' Panel1.
picPanel1.Move GAP, GAP, _
picPanel2.Left - 2 * GAP, hgt
End Sub
|