PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 10
 21 
 on: February 04, 2019, 02:48:11 PM 
Started by Josť Roca - Last post by Joerg Buckel
Hola JosŤ
Thank you for your expansion. I already appreciated this under PowerBasic.
Quote
BTW there are two methods in the PowerBasic PowerTime object that I already haven't implemented: DateDiff and TimeDiff. Not sure how to code them.

I'm sure you can think a solution. :-))

 22 
 on: February 04, 2019, 08:34:08 AM 
Started by Paul Squires - Last post by Paul Squires
Thanks Andrew, still lots of work to do but it is getting easier and easier because a lot of the hard work is now done. Once all of the native controls are added to the designer then we'll be in a good state to start to refine the process from creating an user application from start to finish to make it as smooth and intuitive as possible.

 23 
 on: February 03, 2019, 08:10:46 PM 
Started by Josť Roca - Last post by Josť Roca
I have added these properties and reuploaded the zip file. Now we can use the FreeBasic DateSerial, DateValue, TimeValue, TimeSerial, Now and Format procedures with CPowerTime.

Code: [Select]
DIM ct AS CPowerTime
ct.DateSerial = DateSerial(2019, 2, 4)
ct.DateSerial = DateValue("4/2/2019")
ct.DateSerial = TimeValue("11:59:59PM")
ct.DateSerial = Now
ct.DateSerial = DateSerial(2005, 11, 28) + TimeSerial(7, 30, 50)
Print Format(ct.DateSerial, "yyyy/mm/dd hh:mm:ss")

 24 
 on: February 03, 2019, 07:37:00 PM 
Started by Josť Roca - Last post by Josť Roca
I'm going to add these properties

Code: [Select]
' ========================================================================================
' Gets/sets the date and time as a FreeBasic date serial.
' ========================================================================================
PRIVATE PROPERTY CPowerTime.DateSerial () AS DOUBLE
   DIM ft AS FILETIME
   ft.dwLowDateTime = dwLowDateTime
   ft.dwHighDateTime = dwHighDateTime
   DIM dt AS DOUBLE, st AS SYSTEMTIME
   FileTimeToSystemTime(@ft, @st)
   SystemTimeToVariantTime @st, @dt
   RETURN dt
END PROPERTY
' ========================================================================================
' ========================================================================================
PRIVATE PROPERTY CPowerTime.DateSerial (BYVAL dTime AS DOUBLE)
   DIM st AS SYSTEMTIME
   VariantTimeToSystemTime dTime, @st
   DIM ft AS FILETIME
   SystemTimeToFileTime @st, @ft
   dwLowDateTime = ft.dwLowDateTime
   dwHighDateTime = ft.dwHighDateTime
END PROPERTY
' ========================================================================================

They will allow to use CPowerTime with the FreeBasic date serial procedures, e.g.:

Code: [Select]
DIM ct AS CPowerTime
ct.DateSerial = DateSerial(2019, 2, 4)
Print Format(ct.DateSerial, "yyyy/mm/dd hh:mm:ss")

 25 
 on: February 03, 2019, 07:26:46 PM 
Started by Paul Squires - Last post by Andrew Lindsay
It sounds like things are really progressing well Paul.  I appreciate the effort that you and Jose have made in providing this for the community.  I only wish my work load would drop off so I could relax and spend some time coding.

 26 
 on: February 03, 2019, 06:28:58 PM 
Started by Josť Roca - Last post by Josť Roca
Yes. You can do:

Code: [Select]
DIM cpt AS CPowerTime
DIM cpt2 AS CPowerTime
cpt.Now
print "Press a key"
sleep
cpt2.Now
DIM nTime AS ULONGLONG = cpt2 - cpt
print nTime / CPowerTime_Millisecond
print nTime / CPowerTime_Second
print nTime

BTW there are two methods in the PowerBasic PowerTime object that I already haven't implemented: DateDiff and TimeDiff. Not sure how to code them.

 27 
 on: February 03, 2019, 05:36:22 PM 
Started by Josť Roca - Last post by Paul Squires
I'm browsing through the class and thinking thoughts like, what if I have have a starting powertime and and ending powertime class how would I determine the difference between the two class instances. For example, let's say we want to profile a section of code or an algorithm. Maybe retrieve both using the GetFileTime property and do the difference calculation?

 28 
 on: February 03, 2019, 05:19:17 PM 
Started by Paul Squires - Last post by Paul Squires
Update: I also have a draft form created for the StatusBar Editor. It is based on the one in FireFly.

 29 
 on: February 03, 2019, 05:07:02 PM 
Started by Paul Squires - Last post by Paul Squires
Update: I am working on the feature "SnapLines". It is more powerful than the old style snap to grid. You see such a feature in Visual Studio whereby you are moving your control and various alignment lines will appear as the control approaches a nearby control's top or bottom, left or right side. When within a hit zone the control will then snap to the snap line. The control will then only move from that snap position once the user tries to move the control outside the hit zone again. The logic is a little complicated but I have the bare bones of it working.

 30 
 on: February 03, 2019, 04:51:46 PM 
Started by Josť Roca - Last post by Paul Squires
Awesome! Thanks so much.

Pages: 1 2 [3] 4 5 ... 10