Any one know that how to do

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

how can I update client pc date/time after I got server datetime when
start the application program ?

Thanks
Edmond
 
Edmond,


Can you try this one,
\\\
Public Structure SYSTEMTIME
Public Year As Short
Public Month As Short
Public DayOfWeek As Short
Public Day As Short
Public Hour As Short
Public Minute As Short
Public Second As Short
Public Milliseconds As Short
End Structure
Public Declare Sub GetSystemTime _
Lib "kernel32" Alias "GetSystemTime" _
(ByRef lpSystemTime As SYSTEMTIME)
Public Declare Sub SetSystemTime _
Lib "kernel32" Alias "SetSystemTime" _
(ByRef lpSystemTime As SYSTEMTIME)
Private Sub SetTimeUpByOneHour()
Dim systime As SYSTEMTIME
GetSystemTime(systime)
systime.Hour += CShort(1)
SetSystemTime(systime)
End Sub
///
I hope this helps a little bit?

Cor
 
how can I update client pc date/time after I got server datetime when
start the application program ?

You can set one of the properties below to the new date/time:

'Microsoft.VisualBasic.DateAndTime.TimeOfDay'
'Microsoft.VisualBasic.DateAndTime.TimeString'
'Microsoft.VisualBasic.DateAndTime.Today'
'Microsoft.VisualBasic.DateAndTime.DateString'
 
I can't the follow ing properties. Would you show me more detail thath how
to do

Thanks
Edmond
 
hi...cor,

is your code ...try to get server date and update client pc..? I don't
understand your coding...Would you explain your code to me?

Thanks
Edmond
 
Edmond,

Just paste it in a form and change that SetTimeUpByOneHour sub for your
event load form load than you see it working.

Dont forget to set your systemtime back when you have done it.

:-)

Cor
 
I can't the follow ing properties. Would you show me more detail thath how
to do

\\\
Today = #12/12/2006#
///

.... for example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top