Results 1 to 3 of 3

Thread: Status Bars

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Ottawa, Ontario, Canada
    Posts
    2

    Post

    I'm trying to create a status bar that will show the date, time and currently active child form. I can get the date and time without any problems, but getting the caption of the active child form is causing me some problems. Here is the code that I'm using:

    Private Sub MDIForm_Load()
    Dim pnl As Panel
    Dim sts As String

    With sts
    .Text = MDIForm1.ActiveForm.Caption
    End With

    With stsStatus.Panels
    Set pnl = .Add(, , , sbrTime)
    Set pnl = .Add(, , , sbrDate)
    Set pnl = .Add(1, , "Test")
    End With
    End Sub

    Can anyone see where I'm going wrong, or maybe suggest a different approach? Thanks in advance.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    the MDIForm_Load event only happens when the parent form is loaded....try putting that code into the Form_Activate or Form_Paint of your child forms

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Ottawa, Ontario, Canada
    Posts
    2

    Post

    Thanks a lot, did that and it worked fine.

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