Results 1 to 6 of 6

Thread: Status bar control

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59
    Anyone know how to update a status bar on a main form from another form?

    I have main form that controls my app (frmMain) that I want to update the status bar from within another form that was called by the main form.

    Here's the code I used but the main form never shows the text in the statusbar.

    frmMain.sbStatusBar.Panels(1) = "My Test Text"

    If I put this line somewhere in the code of FrmMain it will work.

    Thanks.

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    Lightbulb Refresh Status Bar

    After the line of code that says

    Code:
    frmMain.sbStatusBar.Panels(1) = "My Test Text"
    place the following code

    Code:
    frmMain.sbStatusBar.Refresh
    Iain, thats with an i by the way!

  3. #3
    New Member
    Join Date
    Jan 2000
    Location
    Plano, TX, USA
    Posts
    11

    Question

    Or, you can simply change the command to give a direct call to the text property.

    frmMain.sbStatusBar.Panels(1).Text = "My Test Text"

    Chris Hockenberry
    Application Engineer
    Willow Bend Communications

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59
    Actually, I did have the .text reference but I forgot to type it in my original post.

    I also tried the .Refresh but it didn't work either.


  5. #5
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    You could try either of the following after setting the text in the status bar.

    Code:
      frmMain.Refresh
    or you could try

    Code:
      DoEvents
    Iain, thats with an i by the way!

  6. #6

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59

    Smile

    In case anyone cares, I figured out how to update the statusbar. None of the above methods worked but thanks for the posts.

    The status bar could not be updated unless the second form that was called by the main form finished executing. So I setup a function to execute immediately after the frmSecondform.show code.

    If someone could explain why that form must complete that would be great!

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width