Record SYSTEMTIME
wYear as word
wMonth as word
wDayOfWeek as word
wday as word
wHour as word
wMinute as word
wSecond as word
wMilliseconds as word
End record
Declare GetSystemTime as "GetSystemTime" of "Kernel32"
lpSystemTime as SYSTEMTIME
End Declare
Object frmForm as Form
Caption="Form"
Width=640
Height=480
Center
`BorderStyle=BsDialog
`Other objects
Object btnButton as Button
Tag=0
Top=10
left=10
`Width=100
`Height=30
Caption="Button1"
Hint="This is a button"
ShowHint=True
`Cursor=crHandPoint
`Bitmap.loadFromFile("bitmap.bmp")
OnClick=btnButton_OnClick
End Object
`End other objects
`Onshow=frmForm_Onshow
`Onclose=frmForm_Onclose
End Object
`frmForm.WindowState=WsMaximized
frmForm.Showmodal
Sub btnButton_OnClick
dim hora as word, minutos as word, segundos as word
GetSystemTime.Execute
hora=GetSystemTime.lpSystemTime.whour
Minutos=GetSystemTime.lpSystemTime.wMinute
segundos=GetSystemTime.lpSystemTime.wSecond
Showmessage str$(hora)+":"+str$(Minutos)+":"+str$(Segundos)
End Sub
GetSystemTime example
GetSystemTime example
Thanks Angel, i not even knew that fnxbasic had word, this is working now, but to get your pc time you must change getsystemtime to getlocaltime in the api call
Does fnxbasic have also DWORD? 32 bits instead of 16 WORD?.
Thanks.
Does fnxbasic have also DWORD? 32 bits instead of 16 WORD?.
Thanks.
GetSystemTime example
Hello Cvirus,
fnxBasic does not support Dword.
GetSystemTime can be replaced with GetLocalTime.
fnxBasic does not support Dword.
GetSystemTime can be replaced with GetLocalTime.