visual basic 60 statusBar updating

I am writing a visual basic 60 MDI application and I wish to update the StatusBar which is located on the frmMain Form from a MDIchild Form during run time without having to click on the StatusBar.

I am setting the MDIchild Form text as followes:

Private Sub Form_Load()
URLA1.Move 0, 0
Unload frmSearch
Text100.Text = "Players 1 & 2 Selected"
End Sub

I can update the StatusBar by using the following code and clicking the mouse on the StatusBar control.

Private Sub sbStatusBar_PanelClick(ByVal Panel As MSComctlLib.Panel)
sbStatusBar.Panels(1).Text = ActiveForm.Text100.Text
End Sub

I want to update the StatusBar from the MDIChild Form use code only, no mouse clicks.

Thanks for any help I can get.
jimwilsonAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
So, do you accept the work I have done for you?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Place this line in the Form_Load event of each form:
frmMain.sbStatusBar.Panels(1).Text = Text100.Text
0
 
jimwilsonAuthor Commented:
When I use frmMain.sbStatusBar.Panels(1).Text = Text100.Text inthe Form_Load or any other Proceedure of the MDIchild Form it fails with the message:

Only one MDI form allowed.

Any other suggestions?

Jim
0
 
Éric MoreauSenior .Net ConsultantCommented:
Create a new test application. This project must have a MDIForm and 2 child forms.

In the project properties, make your MDI form the starting form.

To the MDIForm, add a statusbar, a picture and 2 command buttons into the picture. In the Click event of the both command buttons, display the according form (Form1.Show)

In each Form_Activate event of your child forms, put this:
MDIForm1.StatusBar1.Panels(1).Text = Me.Caption
 
This works for me.
0
 
jimwilsonAuthor Commented:
It works fine now.  It was a startup problem I had not looked for.

Thanks
0
All Courses

From novice to tech pro — start learning today.