Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Form will not allow move when maximized Collapse All
Subject Author Date
James Standen Feb 9, 2015 - 3:33 PM


I am evaluating the ribbon control, and am having an issue- when the application is maximized it can not be moved (it is a forms application and has a main form)

IE maximize the form, and grabbing the top of the form and click dragging does not have the form minimize and move as it normally does.

Art Wilkes Feb 10, 2015 - 9:20 AM

Modify ProcessButtonDown method from FormFrameSkinner.cs in Elegant.Ui.Common (red is the color for modification):

private bool ProcessButtonDown(ref Message m)
if (GlassEnabled)
return false;

            MouseButtons button = MouseButtons.None;

                case WinApi.WM_NCLBUTTONDOWN:
if (Form.WindowState == FormWindowState.Maximized && m.WParam == (IntPtr)StandardFrameItemType.Caption)
if (Form != Form.ActiveForm)

return false;
             button = MouseButtons.Left;
                case WinApi.WM_NCMBUTTONDOWN:
                    button = MouseButtons.Middle;
                case WinApi.WM_NCRBUTTONDOWN:
                    button = MouseButtons.Right;
                case WinApi.WM_NCXBUTTONDOWN:
                    if(m.WParam == (IntPtr) WinApi.XBUTTON1)
                        button = MouseButtons.XButton1;
                        button = MouseButtons.XButton2;

            Point screenPoint = new Point(m.LParam.ToInt32());

            IFormFrameItem frameItemAtPoint = GetFormFrameItemAtPoint(screenPoint);
            if(DesignMode && frameItemAtPoint is FormFrameCaptionButton)
                return false;

            Control control = GetHandlefulControlAtPoint(screenPoint);
            if(control == null)
                return false;

Point point = PointToClient(control, screenPoint);
new MouseEventArgs(button, 0, point.X, point.Y, 0));

            if (Form.WindowState == FormWindowState.Maximized)
                IFormFrameItem formFrameItem = control as IFormFrameItem;
                if (formFrameItem != null && formFrameItem.FrameItemType == StandardFrameItemType.Caption)
                    return true;
            if(!(frameItemAtPoint is FormFrameCaptionButton))
                return false;

            return true;

Return false on WM_NCLBUTTONDOWN message when click point is on caption and frame state is maximized.

Art Wilkes Feb 9, 2015 - 4:47 PM

I have forwarded this to the support group we should hear in a day or two.
Sales at Prof-UIS