VB Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click()
Dim l As Long
For l = 0 To 10000000
If (l Mod 100000) = 0 Then
ProgressBar1.Value = l / 100000
End If
Next
ProgressBar1.Value = 0
End Sub
Private Sub Form_Load()
SetParent ProgressBar1.hWnd, StatusBar1.hWnd
With StatusBar1
ProgressBar1.Move .Panels(4).Left, 50, .Panels(4).Width - 30, .Height - 65
End With
SetParent Text1.hWnd, StatusBar1.hWnd
With StatusBar1
Text1.Move .Panels(1).Left, 50, .Panels(1).Width - 30, .Height - 65
End With
End Sub