beginner question on progress bar positioning

  • Thread starter Thread starter Eva
  • Start date Start date
E

Eva

hi,

I have just managed to add a progress bar to my statusbar
control. the problem i am having is that t appears in the
far left as default. I want it to appear in the far right
side of the form. Can anyone help me code this or point
me to a good article??

this is my code so far..
Dim Pbar As New ProgressBar()
StatusBar1.Controls.Add(Pbar)
Pbar.Visible = True

Thx
 
You need to add panels to the status bar, and place the
progress bar in the right most panel. If there is no
reason to do this in code, I would do it in the designer
and add at least two panels to the statusbar. Then put
the pbar in the second panel. The statusbar does not
appear to act as a container, as I believe it did in VB6.
Unless there is a reason to place the pbar in the
statusbar, I wouldn't even use a status bar. Then you can
anchor the pbar left,bottom, right and it will autosize if
the form is resizable.

Hope this helps.

See articles on general .NET, add-ins, free code, books at
http://www.knowdotnet.com
 
Back
Top