When you open the form the onmousedown does a check to see if the click from the mouse is on the form or outside the form or if the click is on the close section of the form.
This part works fine except when i click on the form i have to click once to say i am on the form then a second time to access any controls, I want to transfer the click after the check to any underlying controls.
here is the code any help would be greatly appreciated.
Expand|Select|Wrap|Line Numbers
- //Check to see if the close button is pressed on the drop-down form to allow the user to close it early.
- if (_llClose.RectangleToScreen(_llClose.ClientRectangle).Contains(Cursor.Position))
- {
- Close(); //close the drop-down
- }
- else
- {
- //Check to see if the click is inside the drop-down Form
- if (RectangleToScreen(ClientRectangle).Contains(Cursor.Position))
- {
- rectangleChecked = true;
- OnMouseDown(e); //normal mouse behavior
- FrmAddressEntry_MouseClick(this, e);
- }
- else
- {
- Close();
- }
- }