Blue.Windows.StickyWindow.OnNCLButtonDown C# (CSharp) Method

OnNCLButtonDown() private method

Checks where the click was in the NC area and starts move or resize operation
private OnNCLButtonDown ( int iHitTest, Point point ) : bool
iHitTest int
point Point
return bool
        private bool OnNCLButtonDown( int iHitTest, Point point )
        {
            Rectangle rParent	= originalForm.Bounds;
            offsetPoint			= point;

            switch ( iHitTest )
            {
                case Win32.HT.HTCAPTION:
                {	// request for move
                    if ( stickOnMove )
                    {
                        offsetPoint.Offset ( -rParent.Left, -rParent.Top );
                        StartMove();
                        return true;
                    }
                    else
                        return false;	// leave default processing

                }

                // requests for resize
                case Win32.HT.HTTOPLEFT:
                    return StartResize ( ResizeDir.Top | ResizeDir.Left );
                case Win32.HT.HTTOP:
                    return StartResize ( ResizeDir.Top );
                case Win32.HT.HTTOPRIGHT:
                    return StartResize ( ResizeDir.Top | ResizeDir.Right );
                case Win32.HT.HTRIGHT:
                    return StartResize ( ResizeDir.Right );
                case Win32.HT.HTBOTTOMRIGHT:
                    return StartResize ( ResizeDir.Bottom | ResizeDir.Right );
                case Win32.HT.HTBOTTOM:
                    return StartResize ( ResizeDir.Bottom );
                case Win32.HT.HTBOTTOMLEFT:
                    return StartResize ( ResizeDir.Bottom | ResizeDir.Left );
                case Win32.HT.HTLEFT:
                    return StartResize ( ResizeDir.Left );
            }

            return false;
        }