Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/01/22 in all areas

  1. I never understood the benefit of writing the ExplicitLeft / Top / Width / Height properties for TControl and descendants, which were added in Delphi 2007, to the dfm files. They store the control’s position and size before its Align property was set to something like alClient or alRight, so they can be restored later. That’s useful if you change these by accident or double click on the Align property to go through the possible values, but as soon as you save the form, you don’t really need them any more. Even worse, they seem to change often with no apparent reason and therefore clutter a dfm file’s diff with changes that nobody is interested in. read on in the blog post
  2. Angus Robertson

    calculete time in delphi

    You should never use TDateTime for duration calculations, users can change the system time, and summer time saving changes it twice a year (unless you use UTC time). Always use the difference between two GetTickCount64 Int64 values. Angus
  3. Do you have the CreateDatabase param set. e.g. FDConnection1.Params.Values['CreateDatabase']:=BoolToStr(not FileExists(FDConnection1.Params.Database),True);
  4. FPiette

    calculete time in delphi

    Your code compute the elapsed time for a given calculation, not the time your application is running. Which one do you need? If what you need is the time elapsed since the start of your program, use the main form OnCreate event to record the starting time and a timer to periodically compute the elapsed time (Just the difference between current time and recorded start time) and display it on screen.
  5. FPiette

    calculete time in delphi

    Is it your homework? It would be better that you show the code you already wrote so that we can help you with it. If we give you the solution - which is quite trivial - you won't learn anything.
  6. Kim Madsen

    Encrypting string

    Here is a blog post about exactly that. https://components4developers.blog/2017/09/01/encryption-of-a-string/
  7. To me this seem useless. If devices are linked into a network they're usually controlled by UI of a head unit or by an app (hi Xiaomi). If they're individual, they rarely require rich UI - raising Delphi server+uniGUI on a "smart" bulb just to change its color... rather silly. With all these messy JS frameworks classic nginx+PHP+user-side static pages are unfairly forgotten but they're still the best choice for simple admin consoles
  8. pyscripter

    Your Delphi verion does not support COMMAND

    Do you mean that if you open just one package in Delphi it causes Delphi to freeze? Is it a specific package or any of the packages? Can you reproduce it with a different Delphi installation (possibly in a different computer)?
×