|

Home
Buy
Now
Products
InaAuthenticate
InaAuthenticate.Net
InaCalcStd
(Free)
InaCalcPro
InaCalc.Net
InaCardCheck
InaCardCheck.Net
InaClock
InaClockCtrl
InaClockCtrl.Net
InaCryptCompress.Net
InaEmailCheck
InaEmailCheck.Net
InaEmailSend
InaFileConverter
InaGrid
InaSysTray
InaUploadFile
InaXplorer
XComp
(Free)
Support
About
Press Releases
.Net
InaAuthenticate
InaCalc
InaCardCheck
InaClock
InaEmailCheck
InaEmailSend
InaGrid
InaUploadFile

| |
InaClockCtrl Demo Source
Dim m_strUTC
Dim m_strLocal
Dim m_strError
DoTime()
Sub DoTime
On Error Resume Next
m_strError = ""
Dim InaClockObject
Set InaClockObject = CreateObject("InaByte.InaClockCtrl")
' Set the default time server we are using
InaClockObject.TimeServer = "time.nist.gov"
' Using Proxy? - set lines below
'InaClockObject.UseProxy = True
'InaClockObject.ProxyServer = myProxyServer
'InaClockObject.UseConnect = True
'InaClockObject.ProxyPort = 80
'InaClockObject.ProxyAuth = "username:password"
' Using RAS (DUN)? - set lines below
'InaClockObject.UseRas = True
'InaClockObject.RasAuth = "username:password"
' Get UTC
m_strUTC = InaClockObject.GetUTC()
If m_strUTC <> 0 Then
' Get Local Time from UTC
m_strLocal = InaClockObject.UTCToLocal(m_strUTC)
Else
' Default time server failed!
' Get UTC from our InaClock server
InaClockObject.TimeServer = "ourtimeserver"
m_strUTC = InaClockObject.GetUTC()
If m_strUTC <> 0 Then
m_strLocal = InaClockObject.UTCToLocal(m_strUTC)
Else
m_strError = "Error: Could not retrieve the time"
End If
End If
End Sub
|