Jump to content

Brian Evans

Members
  • Content Count

    392
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Brian Evans

    TControlList — need help!

    Making a Windows API call for every cell to get the text height will be slow period. The call is required since the text needs to be re-flowed when the width changes. It does all cells to get a new total height. As I mentioned for speed you need a different approach that doesn't need to calculate total height.
  2. Brian Evans

    TControlList — need help!

    A scroll bar that is based on # of rows instead of height and only using enough labels to fill the visible area - swapping/drawing content, as necessary. The drawback is jumpy scrolling instead of smooth due to row at a time vs line at a time, but it is orders of magnitude faster. A lot more work to do it with a ControlList but most grids that support variable row height will do all it for you.
  3. Brian Evans

    Delphi app using Access database very slow on network drive.

    Huge slowdowns on a file server can often be due to failed write cache battery backup on a raid controller with spinning disks attached. With two different customers seeing the issue this is less likely the cause. A local SSD or even HD can hide issues with queries and indexes - scanning a 1GB table is nothing from a local SSD but will be much slower going over the network to a spinning disk. Same if antivirus scans the MDB on first open - much faster locally vs across the network. Can check Resource Monitor and see how much disk reads are required when the application does a query.
  4. Another approach: Code like that suggested by Dave but in the form's MouseMove and leave MouseLeave for the panel blank. procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); var LPoint: TPointF; begin if (ParentPanel.Fill.Color = TAlphaColorRec.Red) then begin LPoint.X := X; LPoint.Y := Y; if not ParentPanel.AbsoluteRect.Contains(LPoint) then ParentPanel.Fill.Color := $FFE0E0E0; end; end; procedure TForm1.ParentPanelMouseEnter(Sender: TObject); begin ParentPanel.Fill.Color := TAlphaColorRec.Red; end; procedure TForm1.ParentPanelMouseLeave(Sender: TObject); begin // ParentPanel.Fill.Color := $FFE0E0E0; end;
  5. In 64bit RAX does not contain the first parameter of your Int2Hex function, RCX does. Looks like there are also other problems with the 64 bit ASM code like where the return value is stored: it should end up in RAX, Ref: Using Inline Assembly Code - RAD Studio (embarcadero.com) Ref: Assembly Procedures and Functions - RAD Studio (embarcadero.com)
  6. Brian Evans

    C++ Builder 11.3 / RenameFile() not working?

    I read the question too fast, the code that should have GetLastError added to see any errors specific to the rename (like file open) is commented out. Delphi equivalent pattern is: if RenameFile(oldName, newName) then ShowMessage('File renamed OK') else ShowMessage('File rename failed with error : '+ IntToStr(GetLastError));
  7. Brian Evans

    C++ Builder 11.3 / RenameFile() not working?

    Normal practice to use GetLastError to see what the problem is when some Windows APIs fail. GetLastError function (errhandlingapi.h) - Win32 apps | Microsoft Learn
  8. Brian Evans

    Using FireDAC with Access accdb file

    Can you set it up and test it in the ODBC Data Source Administrator (32-bit)? It should tell you if the 32-bit drivers required are available/installed. If only the 64-bit drivers are installed the newer versions of this utility will mention it. For example on my system I do not have the 32-bit drivers:
  9. Brian Evans

    Interbase dev license

    Couldn't tell you. The wording does suggest they do. The InterBase licensing was too much for me, both cost wise and having to manage licenses, that back in the day I looked for a royalty free alternative. Went with FlashFiler from TurboPower and when they exited the market transitioned to using NexusDB. Combined with a tool to help write queries (Database Workbench by Upscene) it has served my needs for almost two decades.
  10. Brian Evans

    F2047 Circular unit reference.

    I move my own units from the uses clause in the interface section to the implemenation section. An example would be two forms that access some of each other's properties and objects. They have each other listed in the implementation's uses clause.
  11. Brian Evans

    Interbase dev license

    InterBase Developer Edition is free and included with Delphi as an optional feature you can choose in the installer. You can also request a license. The main limitations are: Limited to a maximum of 20 users (and 80 logical connections to the server) Limited to work only for 48 hours, after that time new connections are disallowed and you'll have to restart the server Download the Free InterBase Developer Edition - Embarcadero
  12. Brian Evans

    Showing TMenuItem icons at design time in the IDE

    It seems beyond your ability to not be obnoxious. I don't see a point in continuing to converse who you.
  13. Brian Evans

    Showing TMenuItem icons at design time in the IDE

    I don't think it is "displaying a TPopupMenu at design time" but is a custom form used to design menus. Works fine for the biggest requirements: add menu items and show their relation to each other.
  14. Notice in buy now it shows $3,000 Perpetual License + $999 for one year of Maintenance for Delphi Enterprise. If support is still $999/year that is not much of an anmesty at $2599. Looks like they offered that price or close to it last fall but included 24 months of support. They sometimes offer(ed) discounts on longer support renewals - like 20% off 60 months (paid $ ~4,000 USD in 2022 for that myself on an active Delphi Enterprise license). Might be worthwhile waiting them out or occasionally asking sales about any offers etc.
  15. Brian Evans

    RAD Studio 12 Update 1 IDE Instability

    For code navigation I use MMX Code Explorer which was taken over by Uwe Raabe and is available for free. I have a large wide screen monitor so docking the MMX navigation panes works well. A New Home for ModelMaker Code Explorer™ – MMX (mmx-delphi.de) MMX – speed up your Delphi development (mmx-delphi.de)
  16. Brian Evans

    RAD Studio 12 Update 1 IDE Instability

    Early on I read the terms for the Parnassus stuff, and it included text about sending system information back to them. I have avoided them since because the code to do that often hangs the IDE or causes issues when a security system/IDS/IDP blocks such collection and communication. From the Data section of : License Agreement - Parnassus OÜ
  17. Brian Evans

    Delphi Clipboard - WM_CLIPBOARDUPDATE (sent, but no changes)

    Windows messes with the clipboard so higher integriity processes do not see/get content put there by lower integrity processes. This may be the source of the extra change messages. The problem tasks you list all run with a High integrity level while most things like File Explorer run with Medium. Might have to keep track of the clipboard content and check it is has really changed (not just went from empty to having something or the reverse).
  18. Brian Evans

    What are the performance profilers for Delphi 12?

    There is Nexus Quality Suite | NexusDB which "works with Delphi 5 to Rad Studio 12 Yukon and beyond!". It has a long lineage as it is a successor to the long defunct TurboPower Sleuth QA Suite. A book is available on high performance Delphi which has a free chapter on profiling: Delphi High Performance - Second Edition | Packt (packtpub.com) that covers various tools.
  19. Brian Evans

    Why does IDE require UAC elevation when starting?

    Note Windows does not allow drag and drop from a lower privileged process to a higher privileged one. It is part of UIPI (User Interface Privilege Isolation). If you run Delphi elevated the default file explorer which runs as a regular user will have issues with dropping to Delphi.
  20. Brian Evans

    FireDac in memory dataset filter before iterate?

    Usually start with the bottom question/answer from: TFDMemTable Questions - RAD Studio (embarcadero.com) especially the use of BeginBatch / EndBatch.
  21. Brian Evans

    Flow Chart Software??

    Google Drawings does a decent job.
  22. Brian Evans

    how to delete TFDTable after open

    This might not apply but: most databases have temporary tables of various lifetimes. SQLite has temporary tables that are database session specific and go away on their own when the session is closed.
  23. Brian Evans

    Changing sa password with Delphi

    Darn seems SQL Server doesn't allow the password to be parameterized. An odd quirk. Two options I can think of : passing parameterized values into a chunk of SQL that then creates dynamic SQL and runs that (ex: answer to c# - How to change a sql login password with variables - Stack Overflow) or turning preprocessing off in FireDAC ( qry.ResourceOptions.PreprocessCmdText := false; ) for the query.
  24. The Call Stack window should be showing it during program execution when it hits the breakpoint.
  25. Brian Evans

    Changing sa password with Delphi

    You could pass the password as a parameter to avoid any FireDAC string/macro processing. Use one of the ExecSQL overloads to get rid of the housekeeping lines. qry.ExecSQL('ALTER LOGIN sa WITH PASSWORD = :PASSWORD',['newPASSWD'],[ftString]);
×