w:=screen.Width;
h:=screen.Height;
Top1:=(w-form1.Width*2)/2;
Left1:=(h-form1.height*2)/2;
w、h、Top1、Left1都是Integer是的报错:Incompatible types: 'Integer' and 'Extended'
h:=screen.Height;
Top1:=(w-form1.Width*2)/2;
Left1:=(h-form1.height*2)/2;
w、h、Top1、Left1都是Integer是的报错:Incompatible types: 'Integer' and 'Extended'
h:=screen.Height;
Top1:=(w-form1.Width*2) mod 2;
Left1:=(h-form1.height*2) mod 2;
这样就可以了
mod 应该是 div
Top1:=(w-form1.Width*2) div 2;
Left1:=(h-form1.height*2) div 2;