I've got some ToolStripMenuItem in a MDIParentForm, which I use to enable or disable depending of the status of the form I call clicking on them. If the form is enabled, the ToolStripMenuItem is disabled not allowing to open a new form like it's previously opened. The fact it's that I don't know why, but when I change the focus from one child form to another, the ToolStripMenuItem wich was disabled, become enabled again (and it shouldn't, because I haven't set it like that by code). I've have solved it using this:
Dim formPrevio As Form = Application.OpenForms.OfType(Of AltaUsuario).Where(Function(frm) frm.Name = "AltaUsuario").SingleOrDefault
If formPrevio Is Nothing Then
'open it again
Else
'Get the focus again
End If
But I'd like to know if there's any other way to solve this.