Leaderboard
Popular Content
Showing content with the highest reputation on 06/26/25 in all areas
-
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
I updated the report https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3711 -
How upgrading from Delphi 7 to Delphi 12 eliminated 15 monthly support tickets and unlocked Linux deployment In May 2024, we were contacted by a European leader in natural gas measurement systems. Their software was partly built in Delphi 7 and partly in C#. It had become difficult to maintain. The company wanted to migrate to Delphi 12, modernize the UI, and enable Linux deployment, without breaking existing functionality. Our team faced and handled the following challenges: The project relied on Delphi 7. That version lacked full Unicode support. The framework used ANSI strings by default, and this created critical limitations for modern global applications. The legacy app only ran on 32-bit Windows, using outdated Win32 APIs and hardcoded paths (C:\Data\). This prevented deployment on Linux cloud servers (AWS/Ubuntu). The app was built on obsolete BDE components and unsupported libraries. Here's what we did: ✅ Migrated from Delphi 7 to Delphi 12 ✅ Replaced BDE and Indy 9 with FireDAC and Indy 10 ✅ Refactored code for cross-platform compatibility ✅ Delivered a modernized UI with preserved workflow familiarity We achieved: - 15 support tickets per month were reduced to zero - Windows-only application is now cross-platform - Overall, the application is more prepared for future challenges A few months later, the client returned for an estimate to migrate other Delphi projects to a web-based platform. If you want to see the full story, with the challenges and solutions broken down, follow the link https://www.softacom.com/cases/modernizing-industrial-software-with-delphi-12/
-
I use a TRichViewEdit which has other methods but this should work for a regular TRichEdit as well, do not treat it like a string stream, it's a blob stream. To save the RichEdit var BlobStream: TFDBlobStream; ... ... dbQuery = Select statement for the record that you want to update/create ... dbQuery.Open; try ... ... dbQuery.Append; if you are creating a new record ... ... dbQuery.Edit; if you are editing one ... BlobStream := TFDBlobStream.Create(dbQuery.FieldByName('BlobFieldName') as TBlobField, bmWrite); try YourRichEdit.Lines.SaveToStream(BlobStream); finally BlobStream.Free; end; dbQuery.Post; except on e: exception do MessageDlg(e.Message, mtError, [mbOK], 0); end; dbQuery.Close; To load the RichEdit var BlobStream: TFDBlobStream; ... ... dbQuery = Select statement for the record that you want to read/load ... dbQuery.Open; BlobStream := TFDBlobStream.Create(dbQuery.FieldByName('BlobFieldName') as TBlobField, bmRead); try if not dbQuery.FieldByName('BlobFieldName').IsNull then begin YourRichEdit.Lines.LoadFromStream(BlobStream) ... ... Not sure if there is anything RichEdit needs to update/format the display ... end; finally BlobStream.Free; end; dbQuery.Close;
-
Wat do you use for installing on a Windows 11 macine ?
corneliusdavid replied to EfDev's topic in Tips / Blogs / Tutorials / Videos
InnoSetup -
Bitmaps to Video for Mediafoundation
Anders Melander replied to Renate Schaaf's topic in I made this
"Not thread-safe" in this case doesn't mean crash and burn. It just means that if one thread modifies the global FormatSettings then it will affect all other threads also using it. Hardly a problem - even if you did output floating point values in the exception message. -
I don't think that's quite true, if it fails the rest of WriteOneFrame isn't executed and in Line 1713 an exception is raised with errorcode hr. I could translate it into an EAudioFormatException, though, at the spot you indicate. It was meant as an extra safety check, since the code already checks for EndOfStream, and that hasn't failed so far. But I've put it back in.
-
Then you will have to escape control characters manually, which QuotedStr() doesn't do for you. But, you really shouldn't be concatenating strings to create SQL queries to begin with. Use a parameterized query instead, letting the DB enging handle all of the escaping and quoting for you. Or, use a blob stream (though, I would use TFQQuery.CreateBlobStream() instead of creating TFDBlobStream directly, but either way works). AFAIK, RTF does not use ASCII control characters. Line breaks are handled by \line and \par control words. And there should be no #0 characters at all. That being said, if there are raw line breaks in the RTF, it might be for human reading purposes, but not machine reading. Delphi 12 uses RichEdit 4.1 (since D11) , which is the current version available from Microsoft at this time. I don't know offhand what version of RTF it supports. RTF is encoded in ASCII, which fits in 8bit (AnsiChar) characters in memory, so you don't need to waste memory using 16bit (WideChar) characters to hold it. A Delphi String is 16bit since D2009. This is why I suggested using varchar instead of nvarchar in the DB. Or, a blob field will suffice, too.
-
Some Delphi IDE versions have an annoying bug with the toolbars that makes them unusable if you customize them. If you have seen this problem, you know it, if not, congratulations! Unfortunately I am one of the people who experience this problem and it annoyed me so much, that I added a workaround to GExperts. ... read on in the blog post.
-
Thanks everybody. Now I have a lot to think about, a great chance to expand my horizon at the age of 74:). I'll fix the code. But then I need a bit of time to think. The info is great. Because my poor debugger didn't run the code, because I didn't tell it to do so. I pasted that compatibility code in without checking, probably missed another piece. Mistake I won't do again. So I need to disable LogicalCompare for more compiler versions, or write a header for StrCmpLogicalW.
-
Any VCL/FMX Gantt Chart or visual components that can have such functions
Die Holländer replied to ChrisChuah's topic in VCL
Last week I also needed such timeline component and I started with the basic Jedi Timeline component. It is a basic component but with a bit of programming and the use of an extra StringGrid for the right side, a ScrollBox (horizontal scroll) and extra Scrollbar (vertical scroll) I got all the functionality I needed. It has an imagelist property to display images in the timeline. delphi-jedi.org TJvTimeLine -
I think TVirtualImageList is automatically scaled when DPI changes only when TVirtualImageList is placed on a TForm/TFrame (look for SendChangeScaleMessage in the VCL code). So you'll have to override the panel ChangeScale method and set the image list size.
-
Hi, can anyone help me with this? Where am I supposed to store my images on Android? I use the deployment manager to store them in "res\drawable-xxx" but my app does not find it. How do I access the folder from the binary file? I mean, would that be "res\drawable-xxx" or "..\res\drawable-xxx"? Thanks
-
Where do I store my own images on Android?
Dave Nottage replied to John Kouraklis's topic in Cross-platform
Is there an issue with using GetDocumentsPath (which in the deployment manager for Android translates to assets/internal), or subfolders thereof? Alternatively, use KodeZwerg's solution. GetHomePath in deployment manager translates to ., i.e. the root