473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

"Automatically adjust clock for daylight saving changes"

Is there a way to know if this is set to true on the Windows Time Zone tab?
Feb 28 '08 #1
5 6560
BobAchgill schrieb:
Is there a way to know if this is set to true on the Windows Time Zone tab?
Through the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\TimeZoneInformation

Value: DisableAutoDaylightTimeSet

A value of 1 means the setting is disabled otherwise the value didn't
exist or is 0.

Thorsten Doerfler
--
Microsoft MVP Visual Basic

vb-hellfire visual basic faq | vb-hellfire - einfach anders
http://vb-faq.de/ | http://www.vb-hellfire.de/
Feb 28 '08 #2
I tried this see below but got this Error
Unhandled Win32 Exception
Imports System
Imports Microsoft.Win32

Put this in the Form1_Load...

MsgBox("DisableAutoDaylightTimeSet = " +
Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentCo ntrolSet\Control\TimeZoneInformation").GetValue("D isableAutoDaylightTimeSet"))
"Thorsten Doerfler" wrote:
BobAchgill schrieb:
Is there a way to know if this is set to true on the Windows Time Zone tab?

Through the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\TimeZoneInformation

Value: DisableAutoDaylightTimeSet

A value of 1 means the setting is disabled otherwise the value didn't
exist or is 0.

Thorsten Doerfler
--
Microsoft MVP Visual Basic

vb-hellfire visual basic faq | vb-hellfire - einfach anders
http://vb-faq.de/ | http://www.vb-hellfire.de/
Feb 28 '08 #3
BobAchgill schrieb:
I tried this see below but got this Error
Unhandled Win32 Exception
Imports System
Imports Microsoft.Win32

Put this in the Form1_Load...

MsgBox("DisableAutoDaylightTimeSet = " +
Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentCo ntrolSet\Control\TimeZoneInformation").GetValue("D isableAutoDaylightTimeSet"))
WFM. WinXP SP2. .NET 2.0 SP1

Thorsten Doerfler
--
Microsoft MVP Visual Basic

vb-hellfire visual basic faq | vb-hellfire - einfach anders
http://vb-faq.de/ | http://www.vb-hellfire.de/
Feb 28 '08 #4
Thorsten,

So you are saying that my syntax was exactly correct but I need to these
prerequisites ...???

WFM. WinXP SP2. .NET 2.0 SP1

What is WFM??

Thanks!

Bob

"Thorsten Doerfler" wrote:
BobAchgill schrieb:
I tried this see below but got this Error
Unhandled Win32 Exception
Imports System
Imports Microsoft.Win32

Put this in the Form1_Load...

MsgBox("DisableAutoDaylightTimeSet = " +
Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentCo ntrolSet\Control\TimeZoneInformation").GetValue("D isableAutoDaylightTimeSet"))

WFM. WinXP SP2. .NET 2.0 SP1

Thorsten Doerfler
--
Microsoft MVP Visual Basic

vb-hellfire visual basic faq | vb-hellfire - einfach anders
http://vb-faq.de/ | http://www.vb-hellfire.de/
Feb 28 '08 #5
BobAchgill schrieb:
So you are saying that my syntax was exactly correct but I need to these
prerequisites ...???
The syntax is correct and doesn't cause an Win32 Exception here. I
would not say that the code will only working on WinXP SP2, it was the
only system I tried that. Maybe it would be easier, if you tell us,
what is your system configuration, where you get the Exception.

Normally the code shouldn't throw an Win32 Exception, only an
NullReference Exception, when the Value didn't exists. Maybe better,
if you use a default value:

MsgBox("DisableAutoDaylightTimeSet = " &
Registry.LocalMachine.OpenSubKey( _
"SYSTEM\CurrentControlSet\Control\TimeZoneInformat ion" _
).GetValue("DisableAutoDaylightTimeSet", 0).ToString)
WFM.

What is WFM??
Works for me.

Thorsten Doerfler
--
Microsoft MVP Visual Basic

vb-hellfire visual basic faq | vb-hellfire - einfach anders
http://vb-faq.de/ | http://www.vb-hellfire.de/
Feb 29 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: sparks | last post by:
As you might know that "java.lang" package are automatically imported by the java compiler so that one don't need to write the import statement of that package in the source code. Are there any...
3
by: Alexander Farber | last post by:
Hi, does anyone have an idea, why do I get the following error (I have to use g++296 on RedHat Linux as compiler): In file included from r_dir.cpp:9: r_obey.h:262: declaration of `const...
13
by: gary | last post by:
Hi, We all know the below codes are dangerous: { int *p = new int; delete p; delete p; } And we also know the compilers do not delete p if p==NULL. So why compilers do not "p = NULL"...
1
by: Weixiao Fan | last post by:
as we know , FONT is not availble for XHTML standard . but VS.NET 2003 add it automatically. what can I do to make all the BODY , TD , FONT and so on to body ,td ? and don`t let it add <FONT>...
0
by: wurlds_wurst_coder | last post by:
A co-worker apparently checked the Show Disassembly Automatically checkbox at some point. This is really inconvenient to disassemble every dll we use everytime. How do I turn this option OFF??...
2
by: Ellis Yu | last post by:
Dear All I'm trying to create a control that inherits the combobox control. When I entered in the line "Inherits Combobox", the IDE automatically added the method Public Sub New(ByVal Container...
1
by: John Bailo | last post by:
using ( SqlCommand cmd = new SqlCommand("select * sample"), new SqlConnection( sqlDsn ) ) ) { SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataTable dt = new DataTable();...
3
by: Jorge Godoy | last post by:
Hi! Is there something I can do in PIL to restrict a line to a certain size and have it to break/wrap into a newline automatically? (Or by using some code, of course...) I'm trying to add...
2
by: NowItsWhatever | last post by:
In query DESIGN view, how do I automatically "fit" the columns in the table/field grid to the lengths of the table and field names (including any functions applied to the fields). I am not talking...
0
by: =?Utf-8?B?cmZsYXphcm8=?= | last post by:
Hi All, We are trying to build an automation utility to configure OS. I found a way to automate the process below via registry: Control Panel -System Properties -Advanced tab -Performance...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.