Inheriting toolbars

  • Thread starter Thread starter William Gower
  • Start date Start date
W

William Gower

I have a base form that has a toolbar on it. I subclass the form and create
a form called CustomerForm. In the base form I have a Select Case in the
toolbar_buttonclick method.

Dim frm As New form
frm = Form.ActiveForm

select case e.Button.Text
case "Close"
frm.Close()




It closes the entire application not just the customer form which is an MDI
child of the main form.

What am I doing wrong here?
 
* "William Gower said:
I have a base form that has a toolbar on it. I subclass the form and create
a form called CustomerForm. In the base form I have a Select Case in the
toolbar_buttonclick method.

Dim frm As New form
frm = Form.ActiveForm

select case e.Button.Text
case "Close"
frm.Close()

Use 'Form.ActiveMdiChild.Close()' to close the active MDI child form.
 
Back
Top