怎么样才能让表单固定住?(25分)

  • 主题发起人 主题发起人 云忠箭
  • 开始时间 开始时间

云忠箭

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么样才能让表单固定住?
也就是说怎么样不让鼠标托动表单,使表单固定在一个位子?谢谢
 
什么意思???不明白
 
在运行表单时,鼠标可以把表单拖到任何位置,怎样使表单不能被随便被移动(运行程序时)
 
你是说form?把窗口的borderstyle设成bsNone就可以啊。
 
//可以这么写
procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (Button =mbleft)and(FCurrentState <>0)and
(Panel1.Align <>alClient) then
begin
ReleaseCapture;
SendMessage(Panel1.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0 );
end;
end;
 
后退
顶部