1.移动没有标题栏的窗体
在任何控件的OnMouseDown事件中加入以下代码:
- if (Button = mbLeft) then
- begin
- ReleaseCapture;
- Self.Perform(WM_SYSCOMMAND, $F012, 0);
- end;
2.创建圆角矩形窗体
- procedure TForm1.FormCreate(Sender: TObject);
- var
- RgnHandle: THandle;
- begin
- RgnHandle:= CreateRoundRectRgn(0, 0, Width, Height, 9, 9);
- SetWindowRgn(Handle, RgnHandle, True);
- end;
http://blog.csdn.net/dropme/article/details/4504518