• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Controls - Status Bar

What control should i use.

My vb application takes a while to do some processing so i want to let the user know that the application is busy doing something. Any ideas whatr control to use and how to use it on the form ?????
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
There exists a "Status Bar" control:
simply check the following for your Project Components:
"Microsoft Windows Common Controls x.0"

Guy Hengel [angelIII / a3]Billing EngineerCommented:
... now, when you set the simpletext value, don't forget to use the DOEVENTS function to allow the text to be drawn...


   You can also use the progress bar. First set a maximum value.


 Progressbar.Max = 1000
 I = 0

 Within the loop you can mention like
 ProgressBar.Value = I;
 I = I +1;

 This will be more usefull if you are reading a file. Just get the max no of records of the file and give it as the maximum value for the ProgressBar.

 Like ProgressBar.Max = No of records.

 Whenever you read one record. increment the value of
Do EOF()
   ProgressBar.Value = I
   I = I + 1
End Loop

So this will give you a transfer progree until your task is completed.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

I always like to use a combination of the statusbar and progress bar.

For example the way Internet Explore uses the statusbar and then a type of progress bar in a panel of the statusbar to calculate page timeout.  

You can do this by placing the progressbar over top of the statusbar to fit in whatever panel you want.

Hope this helps
The most important thing, is to see that the user does not click any thing on the form when some processing is 'ON'

This can be taken care by setting the


2)PLUS showing the mouse icon as 'Hour-glass'(change it back to the default after the process).

This will surely make the user aware that some process is going on and therefore wont allow the user to click on the an buttons on the form.

The progress bar and status added to the above code will make the application more professional.

I hope this info helps

dont forget to do this after the process..


marksynnottAuthor Commented:

I have found the status bar control - how do i make it do things........
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Either you set the Style
* to 0 - sbrNormal and use the .Panels(x).Text property to display data, or
* to 1 - sbrSimple, and use the .SimpleText value to display text.

To put the progressbar "into" it, you have to move the progressbar to the place, and whenever the form resizes move it where needed. In fact, you take 1 panel of the Panels where you use the .Left, .Top etc properties to move the progress bar as needed.

Drag and Drop the status bar on your form.  By default it will be placed at the bottom of the form.

Then in the code you can change the text like this

Private Sub Command1_Click()
StatusBar1.Panels(1) = "This will take some time...Pls Wait"
'..some of your code goes here, ie opening your recordset
'opening IE or web browser..etc
'..some more code goes here..
End Sub

Also as i suggested , maked the form inactive and the mousePointer=hourglass

also, you can add more Panels on your status bar. This can be done at design time. Go the the status bar properties and Custom properties, Panels tab, Isert Panels to insert more than the Panels you require.

Change the caption of the Panel at runtime, in your code

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now