給你一段代碼﹐我自己有用的(以前DFW上有講過的哈。。)﹐記得給俺分哈
//===========================屏幕窗體分辨率自適應===========================
//--Form調用的窗體
procedure auto_WH(const form:TForm);
var
x,y:Longint;
i:integer;
creenwidth,screenheight:integer;
begin
creenwidth:=1024;//默認為1024*768
screenheight:=768;
form.scaled:=true;
x:=getsystemmetrics(SM_CXSCREEN);
y:=getsystemmetrics(SM_CYSCREEN);
IF(X<>creenwidth)or (Y<>screenheight) then
begin
form.HEIGHT:=form.HEIGHT*X DIV creenwidth;
form.WIDTH:=form.WIDTH*Y DIV screenheight;
form.ScaleBy(X,creenwidth);
end;
SendMessage(Form.Handle,WM_SIZE,SIZE_MAXIMIZED,0);
end;