Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

Supremely Annoying...

MDI Child forms which contain a menu override the MDI Parent forms menu. Is there any way to turn this off? I would like to have the MDI Parent's menu visible on the parent's form and then have the child form's menu visible on the child form. Is this possible?
0
DrDamnit
Asked:
DrDamnit
  • 3
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
create a activeX control with a menu, and put that on the mdi child form.
ensure the negociating values are properly set
0
 
inthedarkCommented:
Or.... put the Child menu on the main form and have it invisible.

 In the form_activate make the menu visible. In for form_deactivate make the menu invisible.

Hope this helps :~)
0
 
inthedarkCommented:
Oh and forgot

In your MDI child you need to place the menu action commands in Public Subs like for example

Public Sub SaveData()
' to do place code here
End Sub

In the main form menu events:

Private Sub mnuSaveData()
   On Error Resume Next
   Screen.ActiveControl.SaveData
End Sub

This also works well for tool bar icons as well, say for example on a save command
button icon, you can activate the same code for global saves on all open mdi forms.

Private Sub cmd_Save()
Dim frm As frmMyMDIChild
For Each  frm in Forms
    On Error Resume Next
    frm.SaveData
Next

End Sub

0
 
inthedarkCommented:
Sorry was very tired yesterday see ** below

Private Sub mnuSaveData()
   On Error Resume Next
   Screen.ActiveForm.SaveData ' ** was activecontrol but should be activeform
End Sub

Being tired is the result of too much fun! :~)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now