Replacing SHFileOperation With IFileOperation To Process Multiple File Operations In One Call (Delphi Code)

delphi-ifileoperation
Starting with Windows Vista (and Windows Server 2008) the Windows API arsenal has a new and more powerful way of performing file operations like copy, move, delete and similar file and folder shell actions. The old (but still valid) SHFileOperation function is now replaced by the IFileOperation interface.
The IFileOperation exposes methods to copy, move, rename, create, and delete Shell items as well as methods to provide progress and error dialogs.
Continue reading

Quick Tip: Locate / ScrollIntoView Focused Node In Virtual Tree View

virrtualtreeview-locatefocusedI’m a huge fan of one big gem in the Delphi third party controls arena: Virtual Tree View.

Whatever issue I had to solve in my applications harvesting the power of the TVirtualStringTree, the component had the answer, either through vast amount of properties or through nicely exposed events.

The only solution I was not able to find straight forward, or out of the box, is how to have a visual indication that the currently focused node is not visible in the tree. Not “not visible” as hidden but not visible as currently not in view.
Continue reading

Have Hints For Some Delphi Controls Stay Longer – Control Specific Hint Hide Timeout Values

hint-hide-timeout-delphiAh, even after years of programming in Delphi, there’s still something new I learn every day (lucky me).

Just recently I needed to have hints (help tooltips) for some buttons to stay visible longer than hints for other controls (like edits, memos and alike).

Found no straight forward solution here…
Continue reading

The (Open) Case Of Dangling Pointers (Invalid Object References) In Delphi

dangling-pointer-delphiI guess you might not know what the term “dangling pointer” means, but if you have ever done some more complex programming in Delphi (where you do not only put controls on a form and handle a few events – rather you create and use objects at run-time) you might have experienced weird Access Violations when you tried accessing properties of an object you though is “Assigned” (or not nil).
Continue reading