Tom F
Members-
Content Count
226 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Tom F
-
How to read an .ini file of unknown encoding a FormatSettings?
Tom F replied to Tom F's topic in FMX
It surprised me to discover that sometimes those settings are changed by users! That's why I want my code to process this file (and others) regardless of machine settings. -
@Lars Fosdal Ha! I actually literally LOL-ed on that. ChatGPT has changed my relationship to RegEx. As we know, it's not always correct, but, hey, what a great tool!
-
How to attach a DigiCert Token certificate to exeutable
Tom F replied to Bart Kindt's topic in Delphi IDE and APIs
It's not easy to figure out for newcomers, which I am. I struggled like you. There are many different ways to use the key, so finding the right way for our simple need (no CI, no server, command line) was quite difficult for me. Hopefully, this can help you: Below are the batch file lines we use. I don't know how much of this applies to you. Paths, app exe filename and ### will of course be different. Tech Support at Sectigo provided great email support on the dongle/key I purchased from them. (I split the single line below into 4 lines to avoid wordwrap on the forum. It's all one line "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /sha1 ############################ /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /n "MyCompanyName, LLC" "C:\Users\user1\Documents\Project1\bin\AppName.exe" IF %ERRORLEVEL% NEQ 0 GOTO ERROR1 "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" verify /pa "C:\Users\user1\Documents\Project1\bin\AppName.exe" The ### above is the thumbprint of the certificate fingerprint. It's found on the details tab as shown in the attached screen capture. (TBH, I can't recall where I found this screen, whether in the dongle app or a right-click on a certificate file or something.) Something similar can be done in the INNO IDE and command line versions. We have the dongle on a local machine. We have to enter the token password once, the first time we run the above after booting that machine. -
We use TurboPower's encryption tools (available for free under Tools > Package Manager for these kinds of mild protection from prying eyes. GetKey in the code below just returns the key we use. I'm sure purists will find all sorts of problems with the code below (including the FreeAndNil). But, hey, you do you and we'll do us. This isn't a banking app, it's obfuscation.
-
We've used a flag for years. It takes, what?, about one minute to implement and has an almost zero risk of being buggy. Our advice is to take the easy road here: use a flag.
-
The code above indeed does come from Embarcadero. I searched the site for GlobalUseMetal in the past year to find this. See https://quality.embarcadero.com/browse/RSP-42424.
-
The DelphiGroups post I linked to previously mentions That Raize allows customizable glyphs. So, if the grayed out box as a third state is too ambiguous for you, you might check out is TCheckbox to see if you can modify the appearance of his checkboxes in a way that works for you. I was thinking of something like the one below, although I imagine that there are legitimate objections to the ambiguity as well as how difficult it might be to differentiate such a small difference in appearance between the second and third one.
-
A TCheckBox with AllowGrayed set to true has three possible states; checked, unchecked, and grayed according to : http://www.delphigroups.info/2/6/245597.html I thought TRzCheckbox might have more, but the thread seems to think not... Edit: here's the VCL documentation on it: https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.StdCtrls.TCustomCheckBox.AllowGrayed
-
Contact Rafael at WinLicense to see if he's aware of any problems like this. We've used WinLicense since 2011 and are very happy with it although we haven't tried our app on an ARM platform.
-
https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.StrUtils.SplitString
-
How can a non-modal VCL sub-form notify its owner that the user has closed it so the owner can free it? If the non-modal form's OnClose event calls its owner, the owner can't free the form at that time because the non-modal form's OnClose event is still being run.
-
Wow! I'm sorry you'll miss out on what we've found to be an extremely reliable company and a wonderful tool for us. I hesitate to say more, because I don't want to sound combative or like a shill for the company. Because I'm neither of those. I can only report our experience, which has been excellent. And of course, YMMV. I understand your caution, David. Each company has its own decision-making process, level of due diligence, and degree of risk aversion. We, of course, went through a similar decision-making process before we selected Oreans. Perhaps your bullet points are insurmountable obstacles for you. I'm not going to spend a lot of time here carefully wordsmithing a reply, but, quickly, here's what I thought to myself when I read your bullets: "No legal information." I understand your hesitation on this. Maybe you could reach out to the owner, Rafael, to discuss your concerns. Static and "too good to be true website" Yes, their website hasn't changed in years. Like many developers, he's not a strong marketer. I have never encountered any inaccuracies on the site. "No forum" I've always gotten excellent support via email. Sure, a forum is always nice to have. And I am a big forum user when they're available. But, TBH, the absence of a forum hasn't been an issue for us. This isn't an enormous product where communicating with other users would provide a lot of value to me. "Site is .php" Like you said, this isn't a big deal. See bullet 2. Anyway, I wish you all the best in your product development. Tom
-
Wow. Reading their support blog, their bad attitude comes through clearly. They're likely a bunch of arrogant programmers with no business sense, all the while being sure they're god's gift to earth!
-
Like others, we use https://oreans.com/WinLicense.php. We've been using it since 2012 and have gotten great support when we needed it. It's a stable, well-respected product that never triggers virustotal or other malware detectors. As part of their product, they include a CRM database. We preferred to create our own, and use their DLL locally to generate software keys. It's less than US $500. We consider our having selected it as having been a good technical and business decision.
-
Not specifically a Delphi question: I wrote a program that reads a registry entry of someone else's program, "ProgramX". When I install ProgramX on my Win10 machine, I find ProgamX's registry entries where I expect them: Computer\HKEY_CURRENT_USER\SOFTWARE\CompanyName\ProgramX. However, when a user of my program installed ProgramX on their computer, my program doesn't find that registry entry. The user tells me he used RegEdit to find the entries here: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\StorageDevicePolicies\SOFTWARE\CompanyName\ProgramX. The user is 12 time zones away from me and speaks a different language, so it is difficult to communicate with him. I have googled "CurrentControlSet" but am unable to find anything that explains why CurrentControlSet exists. Is it created explicitly by an application, or is it created automatically by Windows, and why? Is it only created on certain machines, perhaps when there is more than one Windows login? Is reasonable for my program to check the HKEY_CURRENT_USER path for the key and if not found, try to find the registry entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet path?
-
It's nice to see GR32 getting some TLC! Thanks, all.
-
Video capture/processing library recommendations
Tom F replied to David P's topic in Delphi Third-Party
Hi, David, ImageEn may be more than you want to spend on a hobby project. (It was a few hundred dollars several years ago when I bought it.) But the announcement below is pretty exciting. Whether you use it or not, I wanted to post this somewhere here so that others who might be interested would see it too, -
Video capture/processing library recommendations
Tom F replied to David P's topic in Delphi Third-Party
Quite a few years ago I played with Mitov's Vision Lab, which is part of his suite. I never needed to use it, but it was pretty exciting for me to see what it offered for object tracking. There are some downloadable demos here: https://www.mitov.com/products/visionlab#screenshots -
Video capture/processing library recommendations
Tom F replied to David P's topic in Delphi Third-Party
We have used https://www.mitov.com/products/videolab#overview for 13 years. Excellent library to which I owe my company's product's success on Windows and macOS. His tools are threaded, which means you get maximum through-put and the VCL doesn't freeze. Free trial and free to non-commercial organizations. The installer puts some demo programs here C:\Program Files (x86)\Embarcadero\Studio\22.0\LabPacks\Demos. You'll find one there that lets you process frame by frame either a live feed or file playback. Just drop a few components on a designer, hook them up, and grab the "Frame Ready" event to process your data. Check out some of his other tools. He has some real-time tools that do pattern recognition and may be all you need. Boian Mitov is brilliant, IMO. His tools are the best we could find. No royalties necessary. No confusion about FFMPEG patent licensing, which we always worried about. The attached sample has a video feed (of a telescope spectrometer) on the left and some data extracted on the Mitov plot on the right. Tom -
When using a style (e.g.Windows10), the dialog that is displayed by the code below is not resizable. (i.e. There is no handle in the lower right corner with which to drag the window larger.) When using the default Windows style or removing the Options line from the code, there is no problem. We had hoped to start using styles in our app, but a bug like this is discouraging. var SaveDialog1: TSaveDialog; begin SaveDialog1 := TSaveDialog.Create(Self); SaveDialog1.Options := [ofOverwritePrompt]; // removing this line eliminates the problem SaveDialog1.Execute; SaveDialog1.Free; end; Windows 10, D11.1, 32-bit app. Reported here https://quality.embarcadero.com/browse/RSP-38868 Edit: I decided to add a screen capture showing the missing grab handle to resize. I've noticed that when using a style, the dialog box that is missing the grab handle is a different type. It has icons on the left rather than a directory tree. It appears that the VCL Styles changes the dialog box type. What's the difference? Is there a way to show the "old style" (with a tree) when using styles??
-
I do not develop on iOS or Android so I am unable to answer that question, Nico.
-
I'm not sure if this is what you're looking for, but see https://www.swissdelphicenter.ch/en/showcode.php?id=946, where we found the code below. We've been using this code from there for more than ten years with no problems: procedure HookResourceString(rs: PResStringRec; newStr: PChar); var oldprotect: DWORD; begin VirtualProtect(rs, SizeOf(rs^), PAGE_EXECUTE_READWRITE, @oldProtect); rs^.Identifier := Integer(newStr); VirtualProtect(rs, SizeOf(rs^), oldProtect, @oldProtect); end; const NewOK: PChar = 'New Ok'; NewCancel: PChar = 'New Cancel'; initialization HookResourceString(@SMsgDlgOK, NewOK); HookResourceString(@SMsgDlgCancel, NewCancel);
-
I just did a new install of D11. I am trying to put View, Toggle Form/Unit on a toolbar. However, on the Customize screen, Toggle Form/Unit doesn't appear. Does anyone have any suggestions on how to get it back?!
-
That fixed it, Uwe! (So obvious once you know it!) 🙂 THANKSfor you help.
-
I prefer to read rather than watching YT too. However, these days I find many solutions are on YT rather than in prose. I often play YT videos at 1.5 or 1.75 speedup so I don't waste as much time.