Jump to content

Memnarch

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

8 Neutral

About Memnarch

  • Birthday 10/07/1990

Technical Information

  • Delphi-Version
    Delphi 10.1 Berlin

Recent Profile Visitors

103 profile views
  1. Memnarch

    Issues with Fontscaling for HDPI in Delphi Berlin

    AH OK i got the exact situation it happens. Somestimes sfFont is not set in Scalingflags to indicate the font is already at the correct size. But the internal scaling mechanics ignore the property ScalingFlags during loadtimes and use "DefaultScaleFlags" which enforces font scaling. Checking ScalingFlags, i can now properly determine which fonts to scale back to 96ppi after dfm load.
  2. Memnarch

    Is it really good practice to create Forms only as needed? Always?

    Only do this for Forms/Dialogs/UI that is used VERY frequently and as a huge impact when created for the first time. Consider saving a state in Dataobjects somewhere else otherwhise, if needed.
  3. Memnarch

    Is it really good practice to create Forms only as needed? Always?

    I can tell you, if our application was creating all of its gui at startup, hell would freeze over. And your systemresources, too. The ugly thing is, Memory is not what will kill your application. The handle limit will! There is a GDI-handle limit(in addition to others) you'll run into.
  4. Memnarch

    Issues with Fontscaling for HDPI in Delphi Berlin

    ok i went overboard. Because we have a common baseframe class for all our frames, that one will now go through all its controls and fix the initial font scaling in Frame.Loaded. It is absolutely weird, that for some frames, the font has the normal -11 size and for some it is already scaled to -21. Both frames look the same in designer(regarding its font properties). So right now, i do some gueswork on which fonts to scale.
  5. Memnarch

    Issues with Fontscaling for HDPI in Delphi Berlin

    The frames do have a DFM, if that's what you mean by DFM template
  6. Hello, I'm currently working on making our application HDPI aware. We use Delphi Berlin and i encountered some strange scaling issues regarding fonts. A frame that was designed on a 96ppi Screen has a VCL Designsetting of Font.Size = 8 and Font.Height = -11. However, when the frame is created at runtime (TMyFrame.Create), it starts with a Font.Height of -21. From there on it all goes downhill. As soon as frames get parented on a control(or needs to rescale itself) that is already scaled > 96ppi, the Frame rescales its fonts(as it seems using 96ppi as a base). That means that, on a system with a scale of 200%, i get fonts the size of 400% or even 800%. The frames have "ParentFont" set. Disabling "ParentFont" at some places seems to mitigate this issue. But then again, what is happening? A TFont has a PixelsPerInch property, but that one is ignored throughout the scaling mechanics of the controls.
  7. Currently using MiniUPNP for a project. Using the precompiled "upnpc-static.exe" (to avoid errors on my end when using their API, for now, will link to a dll later) i can not discover my router, when the windows service "SSDP Discovery" is enabled. Seems packets are never send from MiniUPNP. Does the Service lock the port 1900 for itself? Windows itself provides a COM-Based UPNP API but that is anything but reliable (sometimes it returns my devices, sometimes not). MiniUPNP works reliable...as long as the SSDP Discovery Service is disabled 😕 EDIT: Accoridng to this, the service cycles the interfaces. WIll have to check if using a specific interface solves it.
  8. Memnarch

    [3D] Why do i need to use negative Y values to go UP?

    Well that's a horrible reason oO
  9. Ok that is super odd. Let alone the Y-Up vs Z-Up war, why is this Y-DOWN? Created a new 3DMultidevice Application. Placed a 3DGrid as a plane and added a camera. I wanted the camera to be above the grid so i typed in 5 for the Y-Value. And the camera moved down. I had to use -5 for the camera to go up. Am i missing something?
  10. Memnarch

    Directions for ARC Memory Management

    Records have no reference counting, and never had
  11. But will we get a statistics page like the one from our german Delphi-Praxis?
  12. So one thing that is a bit irritating for me, because most forums don't do that, is that a Username is not above/below the profilepicture. Because the names are in this blue header, they're kind of invisible to me 😕
  13. Memnarch

    Directions for ARC Memory Management

    Here is an example on SO What i was referring to is std::shared_ptr. A SmartPointer is nothing more than a struct(record) which wraps some kind of pointer and does the lifetimehandling for you by doing actions when scopes are left or smartpointers are reassigned. The std::shared_ptr implements the same behavior we know from strings and interfaces in Delphi. Keeping a referencecounter on top of the allocated memory and freeing it, once the counter reaches zero. In C++ you wrap Interfaces into those, too, because the compiler does not call AddRef/Release automatically (the smartpointer does that for you). SO whenever an object is wrapped by a std::shared_ptr, you know you can safely keep the SharedPointer. Previously, Delphi had no initialize/finalize and Assign operators on records(which are present in C++). Therefore it was impossible to write one(if you didn't want to wrap something in a wrapper TInterfacedObject, being much larger than a SmartPointer)
  14. Yep looks like the principle i wanted to investigate in^^(the combination of webview and native)
  15. Gues what i want to Experiment with XD
×