Jump to content

Der schöne Günther

Members
  • Content Count

    656
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Der schöne Günther

    Setting Scroll Bar Width problem

    I also tried something like this in the past. We dropped it, because it was a bad idea after all, even for a kiosk application like ours. Yes, it takes time. Sometimes, even other 3rd party application would completely lock up. I would strongly recommend to drop this approach. It will take a bit of work to roll your own scrollbar (for a general TWinControl, and maybe a TDBGrid), but you will end up with something that fully suits your needs and can be customized to run differently in Touch and in Desktop mode.
  2. Der schöne Günther

    Find UDP Server

    UDP has a BroadCast(..) method https://stackoverflow.com/a/7424793/2298252
  3. Der schöne Günther

    Using the New Edge browser control

    For your information: WebView2 is now out of preview: Announcing Microsoft Edge WebView2 General Availability - Microsoft Edge Blog (windows.com) Instead of using the runtime (or an installed beta version), it can now also leverage a new "fixed version" (previously called "bring-your-own") which is new and in preview.
  4. Der schöne Günther

    Initialization of returned managed types

    I don't have the source at hand, but Embarcadero said that is is "too difficult" to fix, because the initialization of that variable takes place in another compiler code part that actually doesn't know how the variable is used. There is, however, absolutely no excuse that there is no compiler warning. Embarcadero itself stumbles upon these uninitialized return values. Here's an example: [RSP-18300] TJson.Format() outputs invalid JSON - Embarcadero Technologies
  5. Der schöne Günther

    general question about embedding docs in an app

    This might come across as ignorant and disdainful, but I never understood why one should pick self-created html renderers above a "true" webbrowser that certainly supports a wider range of HTML/CSS (and JavaScript)?
  6. Der schöne Günther

    general question about embedding docs in an app

    I don't quite understand where sqlite comes into play. What did you have in mind? I have been using the TWebBrowser to display rich help documents for a few years now, and it works very well. However, there was never a need to run a full server behind it, I am just displaying local files. This way, the content can easily be changed / updated by our service personal, or even the client himself (for example, when not happy with a translation).
  7. Der schöne Günther

    Does C++ Builder have code completion?

    Thank you. Crazy I just missed the right version. With 10.4.1 instead of 10.4 it would have worked. That's a shame, as I don't have enough hard disk space for yet another RAD Studio VM.
  8. Der schöne Günther

    TWebBrowser very Weird Behavior with Gif images

    I can reproduce it, but I have no idea why this is the case. I suppose it has nothing to do with GIF files, the 2nd TWebBrowser just doesn't get repainted. If you resize your window you see how portions of the 2nd browser view will get repainted.
  9. 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
  10. Der schöne Günther

    Using the New Edge browser control

    I have always put the Edge user-data folder in the %TEMP% folder.
  11. 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.
  12. 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
  13. 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.
  14. Der schöne Günther

    check if App Minimized

    The global application object has an OnMinimize event.
  15. And everything it does is completely synchronous? No threads, task, TThread.Queue, TThread.Synchronize and whatnot?
  16. 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
  17. 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.
  18. 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)
  19. 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?
  20. 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.
  21. 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...
  22. 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.
  23. 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?
  24. 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
  25. 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?
×