Y yyhhnn Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-12 #1 1、如何控制一个有标题栏的FORM不被移动,即固定在一个位置 2、MDIFORM的autoscroll=false属性好像没有用阿, 怎样控制一个MDIFORM不自动出现滚动条
盛 盛利 Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-12 #2 1。拦截移动消息 procedure WMNCHitTest(var Msg:TWMNCHitTest); message WM_NCHITTEST; procedure TForm1.WMNCHitTest(var Msg:TWMNCHitTest); begin //把点击CAPTION伪装成点击Client DefaultHandler(Msg); if Msg.Result = HTCAPTION then Msg.Result:= HTCLIENT; end; 或者设成没有标题栏,在画个假的标题栏
1。拦截移动消息 procedure WMNCHitTest(var Msg:TWMNCHitTest); message WM_NCHITTEST; procedure TForm1.WMNCHitTest(var Msg:TWMNCHitTest); begin //把点击CAPTION伪装成点击Client DefaultHandler(Msg); if Msg.Result = HTCAPTION then Msg.Result:= HTCLIENT; end; 或者设成没有标题栏,在画个假的标题栏