Hello, Everyone.
I have a panel on a form. I am clicking and dragging in the panel. I want to determine if the final mouse position on the form is still on the panel.
I can find the position of the panel on the form:
When I try to find the mouse position relative to the form, I use:
This is giving me the mouse position relative to my monitor.
How should I find the mouse position relative to the form?
Thank you, Everyone.
Patrick B
I have a panel on a form. I am clicking and dragging in the panel. I want to determine if the final mouse position on the form is still on the panel.
I can find the position of the panel on the form:
Code:
NumberPanelLocationX = panel1.Location.X;
NumberPanelLocationY = panel1.Location.Y;
NumberPanelEndLocationX = panel1.Location.X + panel1.Width;
NumberPanelEndLocationY = panel1.Location.Y + panel1.Heigh
When I try to find the mouse position relative to the form, I use:
Code:
FormMouseX = Form1.MousePosition.X;
FormMouseY = Form1.MousePosition.Y;
This is giving me the mouse position relative to my monitor.
How should I find the mouse position relative to the form?
Thank you, Everyone.
Patrick B