private void handleMouseUp(object sender, MouseEventArgs e) { if (p_LogicDisabled) { return; } p_MouseDown = false; Point mousePosition = PointToClient(Cursor.Position); //resolve mouse position relative to the window position //(we get a 0,0 for mouse in top, left corner of window if (p_EventHijacker != null) { p_EventHijacker.OnMouseUp(this, mousePosition, e); } /*fire for all ui elements mouse up*/ int uiL = p_UIElements.Length; for (int c = 0; c < uiL; c++) { p_UIElements[c].OnMouseUp(this, mousePosition, e); } }