下面的代码绝对可用,我想出来的。<br>s :=getwindowlong(handle,GWL_STYLE);<br>s :=s and (not WS_CAPTION);<br>s :=s or WS_POPUP;<br>Setwindowlong(Handle,GWL_STYLE,style);<br>h :=form1.height;<br>t :=form1.top;<br>l :=form1.left;<br>w :=form1.width;<br>sendmessage(handle,WM_SYSCOMMAND,SC_MAXIMIZE,t*65536+l);<br>//下面两句话的作用是让刷新窗口,让最大化效果生效。<br>movewindow(handle,l,t,w,h+1,true);<br>movewindow(handle,l,t,w,h-1,true);<br><br>