2012-04-13 3 views
2

SetTimeZoneInformation을 사용하여 Windows에서 TimeZone 및 일광 절약 시간을 변경하는 데 성공했지만 wMonth를 0으로 설정 한 경우에도 datetime.cpl의 확인란이 선택되었습니다.SetTimeZoneInformation으로 "일광 조절 ..."의 선택을 취소 하시겠습니까?

TIME_ZONE_INFORMATION actual = new TIME_ZONE_INFORMATION(); 
NativeMethods.GetTimeZoneInformation(out actual); 
// Datetime.cpl put the standard time in daylight time and add the regkey 
// When executing this -> Regkey is not set automatically 
actual.DaylightBias = actual.StandardBias; 
actual.DaylightDate = actual.StandardDate; 
actual.DaylightName = actual.StandardName; 
RunWin32Method(() => NativeMethods.SetTimeZoneInformation(ref newZone)); 
NativeMethods.SendMessageTimeout(NativeMethods.HWND_BROADCAST, NativeMethods.WM_SETTING_CHANGE, IntPtr.Zero, IntPtr.Zero, 0x00, 1000, out ptr) 

// MSDN said 
// When executing this -> Regkey is not set automatically 
actual.StandardDate.Month = 0; 
RunWin32Method(() => NativeMethods.SetTimeZoneInformation(ref newZone)); 
NativeMethods.SendMessageTimeout(NativeMethods.HWND_BROADCAST, NativeMethods.WM_SETTING_CHANGE, IntPtr.Zero, IntPtr.Zero, 0x00, 1000, out ptr) 

어떻게 변경할 수 있습니까? 수동으로 DisableAutoDaylightTimeSet 레지스트리 키를 수동으로 생성/삭제해야합니까?

감사

답변

0

.../만들기 레지스트리 키를 수동으로 할 수있는 방법입니다 삭제

관련 문제