PDA

Click to See Complete Forum and Search --> : Status Bars


smcniven
Jan 23rd, 2000, 10:25 PM
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.

Clunietp
Jan 23rd, 2000, 10:32 PM
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

smcniven
Jan 24th, 2000, 11:04 AM
Thanks a lot, did that and it worked fine.