不用delphi的froms.pas,将forms.Pas拷到你的目录,改一下forms.pas,再add to project
修改procedure TCustomForm.CreateWnd; 就可以了!
procedure TCustomForm.CreateWnd;
var
ClientCreateStruct: TClientCreateStruct;
begin
inherited CreateWnd;
if NewStyleControls then
if BorderStyle <> bsDialog then
SendMessage(Handle, WM_SETICON, 1, GetIconHandle) else
SendMessage(Handle, WM_SETICON, 1, 0);
if not (csDesigning in ComponentState) then
case FormStyle of
fsMDIForm:
begin
with ClientCreateStruct do
begin
idFirstChild := $FF00;
hWindowMenu := 0;
if FWindowMenu <> nil then hWindowMenu := FWindowMenu.Handle;
end;
{FClientHandle := Windows.CreateWindowEx(WS_EX_CLIENTEDGE, 'MDICLIENT',
nil, WS_CHILD or WS_VISIBLE or WS_GROUP or WS_TABSTOP or
WS_CLIPCHILDREN or WS_HSCROLL or WS_VSCROLL or WS_CLIPSIBLINGS or
MDIS_ALLCHILDSTYLES, 0, 0, ClientWidth, ClientHeight, Handle, 0,
HInstance, @ClientCreateStruct);}
FClientHandle := Windows.CreateWindowEx(WS_EX_CLIENTEDGE, 'MDICLIENT',
nil, WS_CHILD or WS_VISIBLE or WS_GROUP or WS_TABSTOP or
WS_CLIPCHILDREN or WS_CLIPSIBLINGS or
MDIS_ALLCHILDSTYLES, 0, 0, ClientWidth, ClientHeight, Handle, 0,
HInstance, @ClientCreateStruct);
FClientInstance := MakeObjectInstance(ClientWndProc);
FDefClientProc := Pointer(GetWindowLong(FClientHandle, GWL_WNDPROC));
SetWindowLong(FClientHandle, GWL_WNDPROC, Longint(FClientInstance));
end;
fsStayOnTop:
SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or
SWP_NOSIZE or SWP_NOACTIVATE);
end;
end;
在网上找的你看行不行
只有界面上的内容一屏显示不完时才能滚动