: 저는 1024*768 에서 개발하였는데 900*600에서 실행시키니까
: 화면이 엉망이 되더라고요.
: 어떻게 해야지 해상도와 상관없이 화면처리를 할수 있을까요.
: 답변좀 부탁드립니다.
void __fastcall TForm1::FormCreate(TObject *Sender)
{
const int ScreenWidth = 1024;
const int ScreenHeight = 768;
// 만일 개발환경이 800*600 이라면 1024 대신에 800, 768 대신에 600을 넣으시면 되겠죠?? ^^
Scaled = true;
if (Screen->Width != ScreenWidth){
Height = Height*long(Screen->Height) / ScreenHeight;
Width = Width * long(Screen->Width) / ScreenWidth;
ScaleBy(Screen->Width, ScreenWidth);
//이부분이 바로 해상도가 달라질때 윈도우 크기도 해상도 에 맞춰서 바꾸어주는 부분이죠!!!
}
}
그럼 도움이 되셨기를....
|