473,394 Members | 1,765 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,394 software developers and data experts.

System clock

I'm a Visual Basic .NET developer. I would like to know
if there is any code which enables me to set the time of
the System's clock with my favourite values.

Is it possible to make a form with 3 text labels where I
can type the values for hour, minutes and seconds and a
button to apply these values to the system clock? And if
it's possible, how shall I proceed?

I do really need a hint!!!

Please send replies to: ne*******@tin.it

Thank you in advance

Fritz89
Nov 20 '05 #1
4 1750
"Fritz89" <an*******@discussions.microsoft.com> schrieb
I'm a Visual Basic .NET developer. I would like to know
if there is any code which enables me to set the time of
the System's clock with my favourite values.

Is it possible to make a form with 3 text labels where I
can type the values for hour, minutes and seconds and a
button to apply these values to the system clock? And if
it's possible, how shall I proceed?

I do really need a hint!!!
Dim hour, minute, second As Integer

hour = Integer.Parse(txtHour.text)
minute = Integer.Parse(txtMinute.text)
second = Integer.Parse(txtSecond.text)

TimeOfDay = New Date(0, 0, 0, hour, minute, second)

Please send replies to: ne*******@tin.it


Asked here, answered here. ;-)
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Armin Zingler" <az*******@freenet.de> scripsit:
Is it possible to make a form with 3 text labels where I
can type the values for hour, minutes and seconds and a
button to apply these values to the system clock? And if
it's possible, how shall I proceed?

I do really need a hint!!!


Dim hour, minute, second As Integer

hour = Integer.Parse(txtHour.text)
minute = Integer.Parse(txtMinute.text)
second = Integer.Parse(txtSecond.text)

TimeOfDay = New Date(0, 0, 0, hour, minute, second)


I still don't understand why people want to do something like that...

;-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb

TimeOfDay = New Date(0, 0, 0, hour, minute, second)


I still don't understand why people want to do something like
that...

;-)


I didn't think about it. We don't have to understand. ;)
--
Armin

Nov 20 '05 #4
* "Armin Zingler" <az*******@freenet.de> scripsit:
TimeOfDay = New Date(0, 0, 0, hour, minute, second)


I still don't understand why people want to do something like
that...

;-)


I didn't think about it. We don't have to understand. ;)


"By definition."

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

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

Similar topics

7
by: Valiz | last post by:
Hi, I am updating system time with IRIG time source which sends irregular pulses as shown below 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not present) I need to update...
3
by: James Harriman | last post by:
Hi, I need to be able to measure a time interval in milliseconds on a windows machine. I have tried using time.clock() but it appears to measure time in seconds...Is there a way to measure time...
2
by: David Lindgren | last post by:
Hello. I am trying to figure out a way to determine if the user has resetted the system clock between two times of running my application. One idea I have is that I could check the modified date...
10
by: Partho Choudhury | last post by:
Hi all: I need to add a snippet which access the system time (upto atleast milliseconds) using ANSI std. C++. I cannot use MFC and Win32 APIs in my program for now for various reasons. Is there...
8
by: eugene | last post by:
Is there any issue re-setting system time while DB2 database is online and the system clock is ahead. The database is actually a 24x7 operational and a unscheduled shutdown would be a problem....
10
by: MLH | last post by:
I wish to give someone an A97 database they can install on their PC as a runtime application. I want them to click a button on a form (frmDocumentMyPC). I want to document as much useful...
12
by: jUrner | last post by:
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white...
5
by: Moikel | last post by:
Hello, I'm writing a program that requires that I generate random numbers. I'm using the C rand()function. I want to use the system clock as a seed for the function. How do I read the system...
3
by: Carlos Lozano | last post by:
I have requirement to pause the system clock until a certain event (Win XP). Then the clock will be resumed to the real time. I think it can be done using core functions and/or redirecting the...
0
by: David H | last post by:
I am looking for a way to either run a program in the system tray, or (ideally) replace the system clock with my own custom clock app. I know I can use NotifyIcon to put an icon in the tray, but...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.