Jump to content

Der schöne Günther

Members
  • Content Count

    726
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. If the inherited class does not show the event handler, then it most probably says OnClick = nil and overridding the handler from its base class. But to be honest, I haven't tested 10.4.1 yet, only 10.4
  2. Der schöne Günther

    Using the New Edge browser control

    I have always put the Edge user-data folder in the %TEMP% folder.
  3. Der schöne Günther

    Using the New Edge browser control

    There are several ways to ship the edge runtime: Check if the runtime is installed - If not, install it Install Edge Dev or Canary Ship your own edge dlls Option 3 is called "fixed version distribution" and not yet available. There will be no auto-update or anything. You can read more about the different options here: Distribution of Microsoft Edge WebView2 Applications - Microsoft Edge Development | Microsoft Docs PS: That is not true. Nothing gets replaced, they run side by side.
  4. Der schöne Günther

    Variation of FormatDateTime(

    You can easily use a TTimeSpan: program Project1; {$APPTYPE CONSOLE} uses System.SysUtils, System.DateUtils, System.TimeSpan; var StartDateTime, EndDateTime: TDateTime; TimePassed: TTimeSpan; begin StartDateTime := EncodeDateTime(2020, 01, 01, 00, 00, 00, 000); EndDateTime := Now(); TimePassed := TTimeSpan.FromDays(EndDateTime - StartDateTime); WriteLn(TimePassed.ToString()); ReadLn; end. which will output 266.07:29:15.1320000 If you want to have it differently, you can easily define your own format, like function formatTimespan(const timeSpan: TTimeSpan): String; begin Result := String.Format( '%d.%.2d:%.2d:%.2d', [ timeSpan.Days, timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds ]); end; which will then output 266.07:35:12
  5. It's not only about deleting components, it basically affects any change, like reparenting, renaming and even resizing. The best part is that you will only find out by either viewing the parent form/frame in the IDE, or at runtime. The core reason is that inherited forms/frames/data modules often (not always) have extreme redundancy. Look at their DFM files. They repeat their parents content. This is especially funny when you have a huge ImageList that gets copied again and again into dozens of subclasses. The only solution I could ever find is to always pay attention to your DFM files. At every commit in your source control system, do check out your DFM files! Undo changes that were added automatically although you didn't change anything. When I work in Delphi with things that involve the user interface, I spend roughly 30 % of my time reverting redundant changes in DFM files.
  6. Der schöne Günther

    check if App Minimized

    The global application object has an OnMinimize event.
  7. And everything it does is completely synchronous? No threads, task, TThread.Queue, TThread.Synchronize and whatnot?
  8. Der schöne Günther

    XMLDocument and popup windows

    It appears you can use a custom security manager for xml instead of messing with global user preferences. Building a Custom Internet Security Manager | Microsoft Docs
  9. Der schöne Günther

    Blocking the Windows Screen Saver in Delphi

    I see. Still, I like to add things for clarity. It's Delphi, after all 😎 Maybe, one day, on another platform, there could be other alignments, and then it will matter.
  10. Der schöne Günther

    Blocking the Windows Screen Saver in Delphi

    Your declaration of TPowerRequestType is missing a {$MinEnumSize 4} Not sure if the record should also be packed. Personally, I would add it, but the declaration from Winapi.Windows.pas is also omitting it. More Information here (German Language)
  11. Der schöne Günther

    New feature request: Open dfm as Text if malformed (vote if care)

    But what if the DFM is not in text, but binary form?
  12. Der schöne Günther

    August 2020 GM Blog post

    I'm sure that page was basically empty, back in August. Now it lists a lot of interesting sessions.
  13. Der schöne Günther

    Record Alignement and Delphi 10.4.1

    That sounds quite nasty. I think I'll stick with Delphi 10.4.0...
  14. Der schöne Günther

    TestInsight 1.1.9.0 released

    "Run selected tests". If no tests are selected, no tests are being run. It makes sense. But to be absolutely honest, I always wondered the same: How can I "find" the existing tests without running them all?" It never entered my mind I could just use the ⏩ button.
  15. Just take a look at https://www.mozilla.org/en-US/MPL/2.0/FAQ/: Apart from the fact that this is just wrong, what does GPL have to do with MPL?
  16. Der schöne Günther

    UWP update support?

    Automatic updates don't really have anything to do with "UWP". Automatic updates are handled by the operating system. http://docwiki.embarcadero.com/RADStudio/Rio/en/Preparing_a_Windows_Application_for_appx_Package_Distribution http://docwiki.embarcadero.com/RADStudio/Sydney/en/Submitting_Your_App_to_the_Windows_Store and
  17. Der schöne Günther

    August 2020 GM Blog post

    Really looking forward to some additions via GetIt. However, I don't quite understand their "Desktop UX Summit" announcement. What is it, some kind of webinar?
  18. Der schöne Günther

    APPX & ProgramData Folder...

    I haven't quite understood if your issue is that The files from your installer are expected to be in C:\Program Files\WindowsApps\package_name\VFS\Common App Data, but they are not The files are there, but your application does not find them
  19. Der schöne Günther

    APPX & ProgramData Folder...

    Highly recommended read: Understanding how packaged desktop apps run on Windows
  20. Der schöne Günther

    Delphi 10.3.3/10.4 IDE Editor on VMware speed issue

    Is that scaling still an issue for you? Can control Hyper-V whether it assigns the DPI of your host to the guest. It's in the "enhanced session" or whatever it's called in English version. I'm running RAD Studio 10.0 and 10.4 on a 5 year old desktop computer. I gave the VM two cores and a dynamic amount of RAM, not exceeding 6.5 GB. I'm quite happy with the performance...
  21. Der schöne Günther

    Get FormatSettings for a specific language

    I would like to get the format settings for a language, EN-GB for example. I know this is as easy as myFormatSettings := TFormatSettings.Create('EN-GB') My problem: Assuming The current user session is already using this very EN-GB locale And has adjusted the local format settings (for example, by using Windows settings) myFormatSettings will contain the users custom values, not the "original" ones for EN-GB Example: Assert( TFormatSettings.Create('EN-GB').ShortDateFormat = 'dd/MM/yyyy' ) will fail if I have set the computers local format settings for something else. I have tried TFormatSettings.Create(..) where it takes an LCID instead of a string, but all GetUserDefaultLCID(), GetSystemDefaultLCID() or MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK) return the same LCID number and therefore make no difference when trying to extract the short date format from Windows. Is there any way I could still get the "true" short date format that has not been customized?
  22. Der schöne Günther

    Whats the idea behind Dev-Cpp support ?

    Oh my, Dev-Cpp brings back memories. I never knew it was built with Delphi/C++ Builder.
  23. Der schöne Günther

    Where to put SQLite/MDB database in UWP app

    A deployment manager deploys files. It's not an installer. Maybe they will add something like this once RAD Studio will also support MSIX.
  24. Der schöne Günther

    Where to put SQLite/MDB database in UWP app

    I don't quite understand what you mean with "different part of the system". Every packaged app gets its own view of the registry and the file system. Here is a good summary: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
  25. Der schöne Günther

    Where to put SQLite/MDB database in UWP app

    Yes, you're in control of what you do there. I think its the most straightforward way.
×