Hello, In my program, I have added a SplitContainer with Fill on Form.
Where Panel1 keeps all Button and Panel2 keeps other objects,
I'm trying to code on SplitContainer_MouseMove event. But it does not work when i'm Panel1, If i move mouse pointer to panel2 and go again in panel1 then it returns results. But why not its returning result when my mouse Moves on Panel1 always?

I suspect your problem is that the splitcontainer only captures the mouse when you move over the splitterbar. Try wiring up the mouse move event for each panel in the container like this:

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     AddHandler SplitContainer1.Panel1.MouseMove, AddressOf SplitContainer1_MouseMove
     AddHandler SplitContainer1.Panel2.MouseMove, AddressOf SplitContainer1_MouseMove
  End Sub

  Private Sub SplitContainer1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SplitContainer1.MouseMove
     Debug.WriteLine(MousePosition.ToString)
  End Sub

Thanks i'm trying to do this, hope it will help. not sure yet...

Thanks to TnTinMN,
Its working fine. It helped me lot. Thanks Again. Cheers bro.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.