beginner question on progress bar positioning

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
 
L

Les Smith

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top