这是我的组件构造函数:
constructor TDiskMap.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FCellSize:= 13; FCellsH:= 10; FCellsV:= 10;
Width:= (FCellsH * FCellSize) + 1;
Height:= (FCellsV * FCellSize) + 1;
end;
When I run the application, the size of the control is not the one that I set in the constructor, because it is scaled after that. I want to take care myself of scaling and disable this autos-scaling, but TGraphicControl has no Scaled
property. I tried to hook WM_SIZW
, WM_MINMAXINFO
, use Constrains... but no effect. Any ideas ?
I want that no one could automatically resize the control, except me. And I mean at the pixel level... regardless of dpi.