469,322 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

StatusStrip ProgressBar

Since some controls such as the DataGridView take a long time to update
themselves when performing certain tasks, I have added a StatusStrip with a
ProgressBar on it. While I am updating the controls on the form, I want the
ProgressBar to scroll in marquee mode. However, I cannot seem to get this to
work.

I set the StatusStripLabel to the text I want such as "Updating data..." and
then set the ProgressBar's Style property to Marquee mode BEFORE I do any
updates on the controls in the same form. However, the StatusStripLabel does
not display the text and the ProgressBar does not scroll in marquee mode
while I am performing the updates. This does not seem logical to me and I
have no idea why this occurs. Can anybody please help me?
Mar 1 '07 #1
2 10796
On Mar 1, 11:05 am, Aaron <A...@discussions.microsoft.comwrote:
Since some controls such as the DataGridView take a long time to update
themselves when performing certain tasks, I have added a StatusStrip with a
ProgressBar on it. While I am updating the controls on the form, I want the
ProgressBar to scroll in marquee mode. However, I cannot seem to get this to
work.

I set the StatusStripLabel to the text I want such as "Updating data..." and
then set the ProgressBar's Style property to Marquee mode BEFORE I do any
updates on the controls in the same form. However, the StatusStripLabel does
not display the text and the ProgressBar does not scroll in marquee mode
while I am performing the updates. This does not seem logical to me and I
have no idea why this occurs. Can anybody please help me?
You're blocking on the UI thread? If so then that's preventing the UI
updates. Look into using a BackgroundWorker (I'm assuming you're
using .net 2.0 if you're using a DataGridView).

Mar 1 '07 #2
I tried using the BackgroundWorker, but I can't reference the DataGridView in
the DoWork method because the DataGridView is on the UI thread. I think the
StatusBar probably needs to be in its own thread so that it's constantly
repainting while I update the DataGridView. But, how do you put a Windows
Control in a different thread when it's on the same form?
>"wf****@gmail.com" wrote:

You're blocking on the UI thread? If so then that's preventing the UI
updates. Look into using a BackgroundWorker (I'm assuming you're
using .net 2.0 if you're using a DataGridView).

>On Mar 1, 11:05 am, Aaron <A...@discussions.microsoft.comwrote:

Since some controls such as the DataGridView take a long time to update
themselves when performing certain tasks, I have added a StatusStrip with a
ProgressBar on it. While I am updating the controls on the form, I want the
ProgressBar to scroll in marquee mode. However, I cannot seem to get this to
work.

I set the StatusStripLabel to the text I want such as "Updating data..." and
then set the ProgressBar's Style property to Marquee mode BEFORE I do any
updates on the controls in the same form. However, the StatusStripLabel does
not display the text and the ProgressBar does not scroll in marquee mode
while I am performing the updates. This does not seem logical to me and I
have no idea why this occurs. Can anybody please help me?
Mar 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Jim Hubbard | last post: by
2 posts views Thread by robertino | last post: by
1 post views Thread by Carla Simeoni | last post: by
10 posts views Thread by hzgt9b | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.