progress bar postioning

  • Thread starter Thread starter angelina
  • Start date Start date
A

angelina

hi,

I have added a progress bar to my statusbar control. the
problem i am having is that it appears in the
far left as default. I want it to appear in the far right
side of my form. Can anyone give me ay pointers on how to
do this?

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

i have been told to try the dock property but it doesnt
seem to work. this is what i tried...
pbar.dock.right
this however produces an error stating that the 'Expressio
is not a method'

how can i correct this?

thx
 
hi angelina,

i don't know why you have this problem - to less code :]
here is a part of the code I have created - the class is a windows form,
where status bar is placed.
Try this.

Public class Form1
Inherits System.Windows.Forms.Form
Public Sub New()
MyBase.New()
InitializeComponent()
Dim pb As ProgressBar
pb = New ProgressBar()
pb.Dock = DockStyle.Right
Me.statusBar.Controls.Add( pb )
End Sub

( ... rest of the code ... )

hope this helps
 
Back
Top