Jump to content

Uwe Raabe

Members
  • Content Count

    2883
  • Joined

  • Last visited

  • Days Won

    169

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Delphi 11.1 - a month later

    This is standard for D11 and it works quite well when you use the scaled designer, too. Unfortunately that will change your DFM files often in an unwanted way. As long as you are the only one working with these files it might be acceptable, but in mixed environments it is often not really usable in the moment. Seems that Embarcadero itself doesn't make use of the scaled designer: All PixelsPerInch in the form resources of CoreIDE280.bpl are 96 DPI.
  2. Uwe Raabe

    Delphi 11.1 - a month later

    Can you please elaborate on that?
  3. Uwe Raabe

    Delphi 11.1 - a month later

    DPI unaware mode doesn't hinder you to write DPI aware applications with Delphi, which works pretty well meanwhile. It is just that the IDE runs at 96 dpi internally scaled by Windows.
  4. A version of MMX suitable for D7 can be found at the download page after clicking Previous versions. Delphi 7 is supported up to V13.
  5. Uwe Raabe

    Format uses clause

    Can you check if you have some file named Forms.pas or Forms.dcu anywhere in your search paths?
  6. Uwe Raabe

    Format uses clause

    Is that with all units of that project or only with some of them? Anyway, the implementation is quite similar to my command line tool UsesCleaner. If you are curious and the problem persists with that you can debug it yourself without giving away your project sources.
  7. Uwe Raabe

    Format uses clause

    I copied the uses clause as well as the group/sort-order from your post into a fresh VCL forms unit and this is what I get: uses System.Classes, System.SysUtils, Vcl.Forms, Vcl.Graphics, Vcl.Menus, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Controls, Vcl.Dialogs, Winapi.Windows;
  8. Uwe Raabe

    Format uses clause

    Sorry, but I cannot reproduce here. Can you give an example for such a uses clause, please? To be honest, I doubt that there is some wrong with the code. The algorithm tries to find a unit (like Sysutils or Forms) in the search path. If not found, it tries each entry in the Unit Scope Names. That doesn't rule out any uncommon uses clause, so I would like to see an example showing that problem.
  9. Uwe Raabe

    ExtractFileDir

    ExtractFileName(ExeName)
  10. Don't forget to tell them that they shall notify you when someday their hardware changes.
  11. TThread.ProcessorCount seems what you are looking for: /// <summary> /// The number of processor cores on which this application is running. This will include virtual /// "Hyper-threading" cores on many modern Intel CPUs. It is ultimately based on what the underlying /// operating system reports. /// </summary> class property ProcessorCount: Integer read FProcessorCount;
  12. Probably because the threads compete for a free core? If there are more threads than cores, they are not executed one after the other on a core, but are interrupted to give other threads a chance to run. It is even possible that a thread runs on several cores until it finishes. Given the timing for the 1 thread case, the theoretical minimum for 12 thread should be less than 100 ms, which is far away from the actual numbers.
  13. The size can be retrieved from System.TMonitor.CacheLineSize.
  14. Uwe Raabe

    TDataSet emulation without database

    Not when you add MidasLib to the uses clause.
  15. Uwe Raabe

    Time Between

    There is already TimeOf for that.
  16. Uwe Raabe

    Time Between

    Probably because Now contains the date and the time, while EncodeTime uses an implicit date of 0. You may have better results with MyTime := Time; // uses the time part only BackUpStart := dm.SettingBACKUPHOUR.AsDateTime; // which is 20:30 BackUpEnd := BackUpStart + EncodeTime(0,30,0,0); // which is 21:00
  17. Uwe Raabe

    Theme issue...

    Since Delphi 11 the Form Designer adapts to the theme set in the Appearance settings if the corresponding option is enabled.
  18. The variable is defined in the base configuration, so it is safe to use it in the inherited ones, but fails when used inside the base configuration itself. A possible solution is to normalize the project file with Project Magician, which places the variable in front of any others in the base configuration.
  19. Try $(SanitizedProjectName)
  20. Uwe Raabe

    Format uses clause

    I have my doubts that this will ever be switched on - at least not for a longer time. The option will be all or nothing. It will affect all uses clauses in all units, even in all projects if it were not restricted to the Project options. Especially when the Auto Format option is enabled it will kick in whenever MMX manipulates any of the uses clause. A possible way out of this could be to offer another MMX menu command instead of an always effective option (similar to the Format Uses - Alternate command). As long as the units are already sorted alphabetically, any subsequent format will keep that order. Nevertheless, if the demand for such an option is high enough I can see what can be done.
  21. Uwe Raabe

    RAD Studio 11.1 Patch 1

    I wouldn't bet on that. It should work as before when you start the IDE in High DPI unware mode. As older versions are nor High DPI aware anyway, one can just use the new features of D11 this way.
  22. Uwe Raabe

    Format uses clause

    No, that is intended. Sorting is only done on the group level, but keeps the order inside that group intact. That still allows for some control over the unit order - at least inside a group.
  23. Uwe Raabe

    ImageLists. One or Multiple??

    When High DPI support comes into play, there is near to none alternative to a central TImageCollection and individual TVirtualImageLists on each form. Using some SVG ImageCollection reduces the amount of different image sizes needed as well as the DFM size storing them. For years I practiced the several TImageLists in one datamodule approach, but that changed very quickly with High DPI support in my applications.
  24. Uwe Raabe

    Deploy without overwriting the DB?

    When you add System.StartUpCopy to the project, all files deployed to the StartUp subfolder of the app are copied to the Home directory on startup - if they don't exist there.
  25. Uwe Raabe

    How to change the icon of the active tab in TTabControl?

    You can use a local class helper to access the protected method: type TTabControlHelper = class helper for TTabControl procedure UpdateTabImages; end; procedure TTabControlHelper.UpdateTabImages; begin inherited UpdateTabImages; end;
×