I am trying to hook the MouseWheel event so that I can update the scroll value of a scroll bar. Here is the layers of forms. I have a main form, the MdiParent. Inside that is loaded a child form which is a navigation bar similar to that used in Outlook 2003. On the right side of this form is a Panel called RightPanel. Now, this navigation form can hook the MouseWheel event. I have a simple:
this setup work in that form. Now, I am loading a second form into RightPanel by saying:
this.MouseWheel += new MouseWheelEvent(this.HandleWheel);
public void HandleWheel(object sender, MouseWheelArguments e)
This successfully displays the new form within the Panel. No matter how hard I try, I can not get MouseWheel events from the new form. If I load this form as a top level form and don't put it in the Right Panel, it registers MouseWheel events fine. However, I want to keep the form formatted in the parent form so it can not overlap the Navigation bar.
NewForm = new MyForm();
NewForm.TopLevel = false;
NewForm.Parent = RightPanel;
NewForm.Dock = DockStyle.Fill;
Is there a way to accomplish this? I am truly lost and appreciative of any help given.