|
제가 빌더4.0에서 1024,768 서 작업한 프로그램을 800,600 해상도의 컴에서 돌리니...
폼구성이 엉망이 됩니다. 책을 보고 아래와 같이 코딩하였는데, 일부 컴포넌트는
해상도에 맞게 배치가 되는데....아닌것들도 있습니다.
ScaleBy 메소드를 사용하므로 폼의 Scaled 속성도 true 로 했거든요,
Anchors, AutoSize 의 프로퍼티를 변경해도 별 소용이 없습니다.
물론 컴의 해상도를 작업당시의 해상도로 변경하면 되지만...사용자를 고려하다보니
제가 짠 프로그램이 사용자의 해상도에 맞게 변경되어야 하거든요.
다른 부분을 손봐야 하는지 ....고수님들 부탁드립니다. 꾸벅...
//---------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
const int ScreenWidth=1024; <--- 작업당시의 해상도 입니다.
const int ScreenHeight=768;
Scaled=true;
if(Screen->Width!=ScreenWidth)
{
Height=Height*long(Screen->Height)/ScreenHeight;
Width=Width*long(Screen->Width)/ScreenWidth;
ScaleBy(Screen->Width,ScreenWidth);
}
}
//---------------------------------------------------------------
|