![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2021_12/B_member_7379.png)
Brian Evans
Members-
Content Count
323 -
Joined
-
Last visited
-
Days Won
4
Brian Evans last won the day on February 13
Brian Evans had the most liked content!
Community Reputation
92 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Avoid parameter evaluation
Brian Evans replied to Maxime Janvier's topic in RTL and Delphi Object Pascal
Having the logging expressions compiled and executed on a regular basis means they are less likely to break unnoticed and cause issues when you need them. Building logging strings is usually a small fraction of execution time so keeping things simple is a valid choice. -
Not sure what your setup is - what Linux has PAServer on it to run/debug executables written in Delphi? Are you using your Ubuntu 24.04 host? It is best to use a supported distribution, so Ubuntu 22 or Ubuntu 20.04 LTS if you prefer Ubuntu when debugging. Supported Target Platforms - RAD Studio (embarcadero.com)
-
You follow: https://docwiki.embarcadero.com/RADStudio/Athens/en/Delphi_Considerations_for_Multi-Device_Applications#Universal_Binaries ?
-
The DLL it is running, and its location should give some hints as to what it is as will the contents (strings at least) of that DLL. Best to figure out what it is and uninstall or disabled it. Sometimes software is installed as a device driver, I remember an annoying piece of Lenovo software that was like that. Other things that can eat a lot of disk IO would be Windows Search indexing.
-
Breakpoints in Debug + Android 64-bit mode.
Brian Evans replied to dmitrybv's topic in Cross-platform
They are disabled by default on Android devices. You must enable development mode and then also enable USB debugging. Having them enabled has security implications. -
'View as Text' command menu item?
Brian Evans replied to PeterPanettone's topic in Delphi IDE and APIs
Another issue is IDE insight is blind to context menu commands. This means things only available in a context menu are harder to find. -
The person silhouette in the top right, Requests then in the results change the All drop down to Created by me.
-
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.
-
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.
-
Delphi app using Access database very slow on network drive.
Brian Evans replied to Jean-Michel Gaudette's topic in Databases
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. -
How can you track that the mouse is over a certain control or over any of its Child controls.
Brian Evans replied to dmitrybv's topic in FMX
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; -
Unicode NBSP(u00A0) No-Break Space character for 64-bit
Brian Evans replied to sp0987's topic in RTL and Delphi Object Pascal
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) -
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));
- 10 replies
-
- c++ builder
- 11.3
-
(and 1 more)
Tagged with:
-
Normal practice to use GetLastError to see what the problem is when some Windows APIs fail. GetLastError function (errhandlingapi.h) - Win32 apps | Microsoft Learn
- 10 replies
-
- c++ builder
- 11.3
-
(and 1 more)
Tagged with:
-
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:
- 10 replies