Jump to content

A.M. Hoornweg

Members
  • Content Count

    126
  • Joined

  • Last visited

  • Days Won

    3

A.M. Hoornweg last won the day on January 26

A.M. Hoornweg had the most liked content!

Community Reputation

52 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. A.M. Hoornweg

    Using Delphi in Virtual machine for a month

    A lot can be accelerated by changing some Windows 10 settings inside the VM: Control panel -> System -> Advanced system settings -> Advanced -> Performance settings -> Adjust for best performance. Then re-enable only the absolute minimum : ("show window contents while dragging" + "smooth edges of screen fonts")
  2. A.M. Hoornweg

    FastMM4 and option "AlwaysClearFreedMemory"

    My application needs to call sp_setapprole on MS SQL Server which requires a user name and password. So for a brief time I need these in cleartext form. They are currently stored in an AES encrypted file and I decrypt them on the fly when I need them, using Turbopower Lockbox 2.09. I have no way of knowing if its decryption engine leaves any decoded text in freed blocks on the heap so I thought it would be great if I could simply instruct the heap manager to wipe whatever memory is released. This would prevent the password from appearing in a memory dump. Edit: The actual SQL Query is executed using connection.execute(format('exec sp_setapprole ''%s'', {Encrypt N ''%s''}, ''odbc''', [Approle, Approlepassword])); so I cannot exclude the possibility that the "execute" and the "format" commands might put temporary stuff on the heap as well. [edit] the GitHub feature request you mentioned was mine...
  3. Hello all, I'd like to know if it is possible to activate the FastMM4 Option "AlwaysClearFreedMemory" temporarily/on demand in code? The reason being that some of my routines work with confidential passwords/hashes. Delphi often uses temporary "hidden" strings and interfaces (for example when concatenating strings) so there's the risk of legible stuff remaining in RAM when such a routine exits.
  4. A.M. Hoornweg

    Rio and MDI Applications

    This looks promising. My current situation looks very much like this. Users have many views and editors open simultaneously and entering data in one view can change the graphic output in another view:
  5. A.M. Hoornweg

    Rio and MDI Applications

    Hmmm. I have a subscription to both LMD VCL Complete and Finalbuilder. Though I love Finalbuilder, the docking solution it uses is unsuitable for my own application. Finalbuilder is basically an IDE, I love it, but the actual fiddling with action properties is done with modal dialog windows son one can only fiddle with one thing simultaneously. And re-arranging docked panels is by no means trivial. You see, once you detach a panel it has to fit into a rectangular space somewhere. You can't just place the panel anywhere you like, it's not like other panels will intelligently move out of the way if you want to drop one somewhere. When I try, I find myself dragging a panel around, hoping it will snap in somewhere suitable. So once I have a usable layout, I simply try not to break it! MDI may not be the prettiest solution but it actually solves a ton of problems. Open a dozen views or editors at once? Check. Auto-align them all? Check. Want to maximize one of them? It takes just one click. Restore the previous situation? One click.
  6. A.M. Hoornweg

    Rio and MDI Applications

    "Docking" is a paradigm that lets the users assemble a view layout that is not supposed to change often (because docking is awkward). In my case that won't work. There are over 50 scalable views in my application and the user needs most of them on a daily basis. And often there will be multiple instances of the same view type open, to compare data from the oil well with older reference wells nearby.
  7. A.M. Hoornweg

    Rio and MDI Applications

    That's the second mode in which my application works. A toolbar at the top and free floating windows that can be moved between screens. Only... The users don't want to use it that way.
  8. A.M. Hoornweg

    Rio and MDI Applications

    "Tabbed MDI" hides views from sight. In my application, editing data in one view influences calculated values and graphical output in other views and the user really needs to have these views in sight simultaneously. That's the whole point, to have multiple views in sight and to let the user rather than the GUI paradigm decide which ones he wants to see.
  9. A.M. Hoornweg

    Rio and MDI Applications

    The whole thing with MDI is that it is not only suitable to offer a user multiple documents at the same time, but also multiple views at the same time. I haven't seen a good GUI alternative for that. Anything with tabs, bars, pagecontrols etc basically serves to only hide views from sight which is quite the opposite of what I need.
  10. A.M. Hoornweg

    Rio and MDI Applications

    I've never noticed. All my mdi client forms have either a panel or a tscrollbox in the background.
  11. A.M. Hoornweg

    Rio and MDI Applications

    MDI itself works fine on Windows 10 for me.
  12. A.M. Hoornweg

    Rio and MDI Applications

    Hello all, my most important application, a big beast I've been working on for almost two decades and which I must maintain/support indefinitely, is an MDI application. The program offers 50+ different views and editors and the users (working on oil rigs) usually have a handful of these MDI child windows open simultaneously. The program can optionally run in SDI mode but nobody does that - it only clutters their desktop and they must have other applications (such as Word and Excel) open at the same time. A MDI window also has the advantage that you can quickly drag the whole thing (with all child windows) to a different monitor if it gets in the way. It is currently built using Delphi XE. I already had high-dpi awareness V2 working usably (don't ask - it took tons of hacks and sleepless nights) but since I expected native high-dpi support to come to Delphi some day, all those hacks can be automatically disabled with an IFDEF. So now I'm trying to migrate this application from Delphi XE to Delphi Rio. I can compile and run it successfully, but unfortunately Embarcadero chose to not support high-DPI in MDI applications and the visual result is really disappointing. MDI child windows are now unusably small on a high-resolution monitor. I can't force the SDI application model through my users' throats so I must either get this DPI awareness to work properly on Rio or stick with Delphi XE. Sure I could write some flags into the Windows 10 registry to make the whole application non-DPI aware, but that's not a satisfactory solution. I had DPI-awareness working and now I'm losing that. Any ideas on how to solve this?
  13. A.M. Hoornweg

    Boolean evaluation

    In the Windows API, sure.
  14. But a program (such as an editor) needs to know if the file is UTF8 in the first place. Without a BOM, it must guess.
  15. A.M. Hoornweg

    Boolean evaluation

    Not only that, but the code "if Somebool=True" has a little known pitfall. Every Delphi program interfaces with libraries written in C or C++ (such as the Windows API, all sorts of drivers etc) and in the C language, a bool is basically an INT. I have had a few cases where a function was supposed to return a boolean and in reality it returned some integer where 0 signalled FALSE. The code (if Somebool Then...) treats 0 as false and all other values as TRUE. That always works as intended. The code "If Somebool=True THEN ..." only treats 1 as TRUE and everything else as FALSE. CASE statements are affected, too. So the following code fails: var SomeBool:boolean; begin SomeBool:=Boolean(2); //Simulate a DLL returning a "wonky" boolean if (SomeBool=True) then ShowMessage('True'); CASE SomeBool of True: ShowMessage('True'); False:ShowMessage('False'); END; If Somebool then ShowMessage('Still it is true...'); end;
×