Click to See Complete Forum and Search --> : Progress Bar


Charu
May 20th, 2001, 10:43 PM
I put the progrees bar on MDI form. I want to change the size , position of progress bar. But it's size or position is not changing. I found that it's "Align" property is set to 'vbtop'.
This property can be changed to any other values but not to ' vbNone'. Size and postion can be changed if 'Align' property value is 'vbNone'.
But it is not allowing me to set it to 'vbAlign'.
If I cut this progress bar control and place it on other child form of same project, it gives no problem. I tried to change the propery through Propery box as well as in the code . Still same problem continues. Pl. suggest me any solution for it.



charusheela

CK Dixon
May 21st, 2001, 09:19 AM
Controls that you place on the MDI form are aligned to any one side of the MDI form. You cannot set the Align Property to None.

Where do you want to place the progress bar?

At the top? Put it on your ToolBar. It's easy. Drag and Drop the ProgressBar on your Toolbar. Here, you can set its size and position.

At the bottom? Use the SetParent() API to make the status bar its parent.
Here's the process in a little bit more detail:

- Place a status bar on your form. It will be aligned at the bottom.
- Place a progress bar on the MDI form. Don't worry about its alignment.
- Then, in MDI Form Load, you write

SetParent ProgressBar1.hWnd, StatusBar1.hWnd

- Now, you can set the Align property to none, and change its size and position.