给分吧! procedure TForm1.FormShow(Sender: TObject); var SysMenu:HMENU; begin SysMenu := GetSystemMenu(Handle, False); EnableMenuItem(SysMenu, SC_MAXIMIZE, MF_BYCOMMAND or MF_GRAYED); end; 如果想要其他的效果可以向api传不同的参数.
procedure TForm1.FormShow(Sender: TObject); begin SetWindowLong(Self.Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION); ShowWindow(Self.Handle,SW_MAXIMIZE); end; 昨天写的不对,用这个试试!
SetWindowLong(Self.Handle, GWL_STYLE, GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION and WS_EX_TOOLWINDOW); ShowWindow(Self.Handle,SW_MAXIMIZE); 这个一定好使!
SetWindowLong(Self.Handle, GWL_STYLE, GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION and WS_EX_TOOLWINDOW); ShowWindow(Self.Handle,SW_MAXIMIZE); 这个一定好使!
Form1.top:=0;
Frrm1.width:=Screen.width;
Form1.height:=Screen.height;
会把整个屏幕都给罩住。
Form1.left:=0;
Form1.top:=0;
Frrm1.width:=Screen.width;
Form1.height:=Screen.height;
时也要把状态栏也该在后面,谢谢~
如果用api能写的详细点吗?谢了~
procedure TForm1.FormShow(Sender: TObject);
var
SysMenu:HMENU;
begin
SysMenu := GetSystemMenu(Handle, False);
EnableMenuItem(SysMenu, SC_MAXIMIZE, MF_BYCOMMAND or MF_GRAYED);
end;
如果想要其他的效果可以向api传不同的参数.
begin
SetWindowLong(Self.Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION);
ShowWindow(Self.Handle,SW_MAXIMIZE);
end;
昨天写的不对,用这个试试!
GWL_STYLE,
GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION and WS_EX_TOOLWINDOW);
ShowWindow(Self.Handle,SW_MAXIMIZE);
这个一定好使!
GWL_STYLE,
GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION and WS_EX_TOOLWINDOW);
ShowWindow(Self.Handle,SW_MAXIMIZE);
这个一定好使!