Jump to content
Registration disabled at the moment Read more... ×

Brian Evans

Members
  • Content Count

    426
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Brian Evans

  1. Brian Evans

    TEdit and OnTyping event

    That sounds like the OS/keyboard is retyping content into the edit control. The edit does go back to being empty and then having 1,2,3 etc characters in it just within a short period of time. One thought: keep track of the last partial search string and start/reset a short timer in the OnXXX events. When the timer event triggers check if the edit content is not equal to what was last searched for and update the search as appropriate. This gives time for the OS/keyboard to be done changing the edit contents before you use it's contents in your search.
  2. Brian Evans

    libpq.dll found, but not loaded

    Had time to test it and using 32-bit client binaries from a newer PostgreSQL 32-bit ODBC driver version still works. Tested in a Windows Sandbox with a Delphi test app + binaries from the psqlodbc_15_00_0000-x86 32-bit ODBC driver with postgresql-15.13-3-windows-x64 installed. Test app is just a button that opens a connection and pulls results into a grid. Note clients / client libraries are backwards compatible except for some really old versions. You can use the client binaries from the latest release ODBC driver. Tested this with client binaries from the REL-17_00_0006 32-bit ODBC client and connecting to the 15.13-3 server mentioned above.
  3. Brian Evans

    libpq.dll found, but not loaded

    Windows 10 Home version 1903 or later have the Windows Sandbox as an feature that can be enabled. https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-install?source=recommendations Not familiar with Windows 10 Home Single Language and if Sandbox is available as a feature. Worth checking using the above instructions. Could also try an archive utility like 7Zip to extract files from the MSI installer. The Postgres ODBC installer just puts all files in one directory for each version (32-bit or 64-bit).
  4. Brian Evans

    libpq.dll found, but not loaded

    Not actively using PostgreSQL currently but for past use: The PostgreSQL ODBC driver comes in 32-bit and 64-bit versions and uses libpq.dll to connect. It places all the needed files in it's install directories including those it needs form the Microsoft C Runtime Library. Get the ODBC drivers from : https://www.postgresql.org/ftp/odbc/ For version 15 32-bit only that looks like it would be psqlodbc_15_00_0000-x86.zip from https://www.postgresql.org/ftp/odbc/versions.old/msi/ What I would normally do is download the ODBC installer, open a Windows Sandbox, copy and run the installer there. Then look in the appropriate Program Files directory and grab all the needed DLLs from where the ODBC driver was installed.
  5. Brian Evans

    Memo lines{i] to labelv ok. Labels to Memo lines nope

    The Memo could have fewer than three lines in it. If you want to update lines make sure they exist first. while Memo1.Lines.Count < 3 do Memo1.lines.Add('');
  6. I don't lose the HTML body here. 1. Create a formatted draft message. Save as to EML file. 2. Edit the EML file to add the X-Unsent: 1 header. 3. Double click the EML file and it loads in new Outlook as an editable message with HTML formatting intact. The EML file does have two versions of the body - one HTML formatted and one not.
  7. Brian Evans

    TMS TAdvPDFViewer not working on Windows 7 – any workaround?

    Looks like it uses PDF support provided by the OS. So you need another PDF -> image engine/library. ref: https://support.tmssoftware.com/t/tms-vcl-pack-pdfviewer-not-function-on-some-users/24285 https://learn.microsoft.com/en-us/uwp/api/windows.data.pdf.pdfdocument?view=winrt-26100 There is PDFium (https://pdfium.googlesource.com/pdfium/) which is based on the PDF support in Chromium. There are some Delphi components/source that use it - both commercial and opensource. ex https://github.com/ahausladen/PdfiumLib https://winsoft.sk/pdfium.htm Also Developer Express VCL has PDF components as well. Not sure of Windows 7 support but they have a demo you can use to check along with a 30 day trial. Just a bit pricey if not using a lot of the components / functionality they offer. https://www.devexpress.com/products/vcl/pdfviewer/
  8. Brian Evans

    FireDAC getting tripped up with PostgreSQL transactions

    Start with gathering or showing more detailed database exception information. See: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Handling_Errors_(FireDAC) A TFDGUIxErrorDialog that is enabled during debugging can make things a lot easier. Nothing stands out - often if an code block looks clean the error is elsewhere or some assumption being made doesn't hold true.
  9. Brian Evans

    Microsoft Trusted Signing service

    I don't see a certificate with that name here: https://www.microsoft.com/pkiops/docs/repository.htm There is one named microsoft identity verification root certificate authority 2020. Seems a redundant "Enterprise" has been added in some references confusing things. I believe they both refer to the same underlying certificate. The certificate should be automatically installed by Windows if it's connected to the Internet. Ref bottom of: https://support.microsoft.com/en-au/topic/kb5022661-windows-support-for-the-trusted-signing-formerly-azure-code-signing-program-4b505a31-fa1e-4ea6-85dd-6630229e8ef4
  10. Brian Evans

    Alternative for RDP solution

    Native applications can make use of the same REST calls as web apps. Saves creating another API from scratch. There are a few libraries available for Delphi to make this easier. Probably too many which makes choosing a bit of a pain point.
  11. Brian Evans

    What .PAS file does a form use?

    Something to try: Look at a report .pas file for anything that will tell it apart from other non-report .pas files - like use of an ACE Report object/component name. Then do a Find in Files ... for it and see if any results have a .pas file with a name that doesn't follow your usual pattern.
  12. Brian Evans

    Quick-Report - Pointer Error - Composite Report

    That looks like the wrong thing to be working on - an unrolled loop vs a loop just isn't a big deal. Likely separate units so each could be customized but that didn't end up being required. Or some actually are customized by having different properties set for the same base QuickReport layout or in some other way.
  13. When you buy the latest version of Delphi, you also get access to earlier versions of Delphi at no extra charge.: https://www.embarcadero.com/products/delphi/previous-versions Delphi 2010 is covered by this. A lot of third party component vendors do something similar for the same reason with older versions available in the registered users download areas. You may need to make a request or they might be there already.
  14. Brian Evans

    FireDAC encrypted SQLite DB with Delphi 12.3 x64

    What version of SQLite are you trying to use under 64-bit? SQLite dropped support for the method FireDAC was using to provide encryption. Read : https://docwiki.embarcadero.com/RADStudio/Athens/en/What's_New#FireDAC_SQLite_Version_Update
  15. Brian Evans

    Debugger keeps the execution line centered

    Some random questions: 1. Do you have multiple screens with one using a different DPI setting? 2, Anything non-default DPI wise? launch settings, overrides etc Thoughts: could be a bad calculation of if the line to be highlighted is visible and scrolling the editor when it doesn't need to.
  16. My understanding is for expressions with variants non-variants are converted to a variant and operations like + follow Windows OLE (varAdd) in how they are combined. Neither cares about the order of variants/types just about combinations. string + variant with BCD value becomes variant with string value + variant with BCD value. For adding variants string+number or number+string both add numbers. Ref: https://docwiki.embarcadero.com/RADStudio/Athens/en/Variant_Types_(Delphi)#Variants_in_Expressions Ref: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-varadd#remarks
  17. Brian Evans

    Help with JWToken

    The integer part is seconds since the Unix Epoch so is a Unix timestamp. Some sources add fractional seconds so they can contain timestamps with more accuracy.
  18. Brian Evans

    Slow performance. HELP!

    Storage IO suddenly being slower will cause similar symptoms. All writes and any reads that need to get data from the disk instead of the cache bottleneck. Things that used to not interfere with each other now do. Years ago a battery on a RAID card in a SQL Server cluster failed making write performance 5% of normal. All sorts of odd issues until the anemic disk performance was noticed and bunch of disk heavy tasks were temporarily disabled to allow the main work to still get done.
  19. Brian Evans

    KSVC 8.0

    Removed 7 and installed 8 here. No 64-bit design time packages so not yet available in the 64-bit Initial Release of the Delphi 12 IDE. Looking at the contents of C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\KonopkaControls-290-8.0_For12.3\Bin\Win64 there does seem to be 64-bit design time packages but they were not installed? Manually copied the two design time BPLs to C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\Win64, did Component -> Install Packages, Add, selected them both and installed them. Some basic tests and they seem to work.
  20. Brian Evans

    Delphi 12.3 Patch and McAfee

    Most Antivirus software also have a way to submit false positives for further analysis. If they agree they white list the file names and hashes that otherwise trigger their heuristics based scanning engine. Helps others and you don't have to maintain commercial applications in your own whitelist long term.
  21. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Still - where and why? - in a lot of cases you can already know when your code is called. For example OnDrawItem is set per item so you can just assign one procedure for main menu items and another for the rest.
  22. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    One approach: The Items property has a find() method that searches for a match of a caption passed in. It ignores & to make matching easier. So if you have a reference to the main menu you can do mainmenuref.items.find() passing in the caption of the menu item you wish to test. function isMenuMenuItem(MainMenu : TMainMenu; MenuItem : TMenuItem) : boolean; begin If MainMenu.Items.Find(MenuItem.Caption) <> nil then result := true else result := false; end;
  23. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Note that is the wrong inner loop statement. It needs to go a level deeper. FixItem (aMenu.Items[I].items[k]);
  24. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Use two loops to start with so you iterate into sub menu items before calling FixItem(). Then FixItem() only gets submenu items and can be simplified. for I := 0 to aMenu.Items.Count - 1 do for k := 0 to aMenu.items[i].Count -1 do FixItem (aMenu.Items[I].items[k]);
  25. Brian Evans

    12.3 and certaing PNGs: error rendering them

    Well that is a new hell: the forum screws with the image. Also can't seem to delete the image I attached which ended up showing the same issue - size and bit depth messed with by the forum. Looks like it is display issue - click the image to bring up large view, click the large view to bring up a fuller view - now that shows the original uploaded image which you can right click and save image as .. to get the proper bit depth and resolution that was uploaded. If I load the image in your first post which is a 23kb 500x500x32 PNG into a TImage using the IDE it looks normal. Note the image itself does have gray pixels around the edges and borders of the squares - it is not black and white. The 2kb 912x912x1 PNG in the DFM does display oddly both on the form and in the IDE image property editor. In Windows explorer and other image editors I tried it looks normal. It has only black and white pixels. So the IDE does seem to have an issue with the 1 bit per pixel PNG. Can work around it by using a higher bit depth it seems but Delphi should really be fixed as the IDE exhibits the same issue. Attached is the 912x912x1 image re saved using MS Paint as a 9kb 912x912x32 PNG which works fine as well.
×