Consider a two form app. An mdiparent and mdichild. The mdichild mousewheel functions work fine in the mdichild until I click on a mdiparent panel's radiobutton and focus is transferred to a control on the parent.
I am unable to redirect focus from that mdiparent panel's radiobutton back to my mdichild form so that my mousewheel will once again be operational. I've tried activateform, activate, activatemdichild,.focus,.capture,
and just about everything I can think of, apparently except the right thing.
Your help is appreciated. I think my problem must be simple but I am stumped. I can't seem to find a reference anywhere on how to make this work and I have referenced 7 books on vb.net 2003. What am I missing here? Thanks in advance.
7 years later, and no answer? I had the same question... I searched but couldn't find an answer. So I finally found a solution my self today.
MDIChild's mousewheel event doesn't work after you click on a control on the MDIParent, or a control on the MDIChild. The MDIChild loses focus and will not regain focus because the controls remain focused, so the MDIChild's mousewheel event doesn't work.
On the MDIChild's mouse down or click event, set the "ActiveControl" to "Nothing" on all forms that have controls. This will unfocus the controls that are stealing the mouse wheel event.
For me, my MDIParent called "Form1" had textbox and checkbox controls that when focused it would make it impossible to regain focus on the MDIChild by clicking the MDIChild's background. My MDIChild also had a tool strip with a combobox control that would make it impossible for the MDIChild to regain focus and allow the mouse wheel to work when it was focused. So on the MDIChild's mouse down event I added: