-
SetParent
i have got a mdi form, on which i have a status bar and a progress bar. while doing any process i want to show the progress bar in one of the panels of the status bar.
i used the setparent method, but the prgress bar is not fitting into the panel of the status bar.
pls guid me.
regards,
prakash
-
there's no one to answer this question?? :confused: :confused:
-
SetParent wont do that... setparent is for making a window a child of your MDI form...
-
There is no autosize, you have to do it yourself.
I use a common procedure like this
Code:
Sub SetupProgress(Parenthwnd As Long, Top As Long, height As Long, Left As Long, width As Long)
On Error Resume Next
OldProgress = SetParent(fMainForm.ProgressBar1.hwnd, Parenthwnd)
fMainForm.ProgressBar1.height = height
fMainForm.ProgressBar1.Left = Left
fMainForm.ProgressBar1.Top = Top
fMainForm.ProgressBar1.width = width
fMainForm.ProgressBar1.Visible = True
End Sub
and when I want to set up my progress bar onto a panel on my MDI form, in this example panel 3.
Code:
SetupProgress fMainForm.StatusBar1.hwnd, 0, fMainForm.StatusBar1.height, fMainForm.StatusBar1.Panels(3).Left, fMainForm.StatusBar1.Panels(3).width