본문 바로가기
스마트 장치 개발

PocketPC에서 세로보기/가로보기 확인 방법

by leo21c 2008. 10. 23.
SMALL

http://msdn.microsoft.com/ko-kr/library/microsoft.win32.registrykey.aspx


WM 5.0 확인 결과

HKEL_LOCAL_MACHINE -> System -> GDI ->Rotation -> Angle

Angle 값을 통해 확인 할 수 있다.

가로보기 Angle: 0x5A(90)

세보보기 Angle: 0x00(0)


using System;

using System.Security.Permissions;

using Microsoft.Win32;

private void Rearrange()
{
Object temp = null, defaultValue = null;

try
{
RegistryKey localmachine = Registry.LocalMachine;
RegistryKey system = localmachine.OpenSubKey("System");
RegistryKey gdi = system.OpenSubKey("GDI");
RegistryKey rotation = gdi.OpenSubKey("Rotation");

if (rotation != null)
{
temp = rotation.GetValue("Angle", defaultValue);
}

}
catch (Exception ex)
{
// Let the user know what went wrong.
Console.WriteLine("The file could not be read:");
Console.WriteLine(ex.Message);
}

if ((int)temp > 0) normal = false;

}

///////////////////////////////////////////////////////////////////////////////////

레지스트리 에디터에서 'clear'로 클리어타입 설정을 검색하면 맨 처음에 나오는

GDI-> ClearTypeSettings 에서

OffOnRotation 의 Data 값을 '0' 으로 설정해주면 가로화면에서도 클리어 타입이 적용됩니다.

LIST