A docked toolbars can be "glued" with a few lines of codes (e.g. NODEFAULT in events like MouseDown, DblClick).
A docked form ignores all this, and the properties like movable, are either ignored either read-only.
But with a little trick, undocking can be prevented even for forms.
It's enough to cut the titlebar.
CODE --> Foxpro
DEFINE CLASS MyForm as Form
ADD OBJECT cmd as commandbutton
This.Dock(2) && dock to the right side
* cut the title bar so the window cannot be moved or undocked
Declare Long SetWindowRgn IN WIN32API Long hWnd, Long hRgn, String bRedraw
Declare Long CreateRectRgn IN WIN32API Long X1, Long Y1, Long X2, Long Y2
SetWindowRgn(thisform.hwnd, CreateRectRgn(0,SYSMETRIC(4)+SYSMETRIC(9)/2,This.width+2*SYSMETRIC(3),This.height+2*SYSMETRIC(4)+SYSMETRIC(9)/2), "True")
BINDEVENT(This.HWnd,0x0100,This,"preventclosemethod") && intercept keydown to prevent closing the window with ctrl+f4