Link to home
Start Free TrialLog in
Avatar of Zimmerli
Zimmerli

asked on

Progressbar in Statusbar in MDI

How can I put a Progressbar in a Statusbar in a MDI-Main-Form.

If I use the code

Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

SetParent ProgressBar.hwnd, StatusBar.hwnd
ProgressBar.Top = Screen.TwipsPerPixelY
ProgressBar.Left = StatusBar.Panels(2).Left + Screen.TwipsPerPixelY
    ProgressBar.Height = StatusBar.Height - Screen.TwipsPerPixelY * 2
    ProgressBar.Width = StatusBar.Panels(2).Width - Screen.TwipsPerPixelX * 2

I can set the Left and Width property.
Is there a way to do this?
Thanks for your help.

Peter Zimmerli
Avatar of Zimmerli
Zimmerli

ASKER

Sorry I mean I can not set the Left and Width property.
You should be multiplying by the Screen.TwipsPerPixel instead of ADDING.

I have code to a smooth progress bar on my web page you can easily modify for this. It's in the Code Snippets section at: www.cyberchute.com/rvbus/madmark

Check it out!

M

I look in our Home Page. There are very good things there.
(But I don't found a solution for my problem)

If I will set the Progress bar left property I get this
message:

Error 387 was generated by ProgramName 'Left' property can't be set on this control

I think the problem is that the Progressbar is on a MDImainForm.


ASKER CERTIFIED SOLUTION
Avatar of przemek
przemek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.

Please click on your Member Profile, select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.
 
Thanks,
Moondancer
Moderator @ Experts Exchange