JonRobertson
Members-
Content Count
278 -
Joined
-
Last visited
-
Days Won
6
Everything posted by JonRobertson
-
Seeking Collaboration: Creating a Delphi Component for STM32 Boards
JonRobertson replied to techdesk's topic in General Help
Or build the desired applications using C++ Builder? -
What new features would you like to see in Delphi 13?
JonRobertson replied to PeterPanettone's topic in Delphi IDE and APIs
You don't "set" it. You launch it. Click the Windows Start Button and either expand the Embarcadero Delphi group, or type "Delphi" or "DPI" or "Unaware". One of those should reveal an icon for Delphi (DPI Unaware). If you launch BDS.exe by another method, add /highdpi:unaware as a command-line parameter. -
A native VCL, and not Windows-based, TComboBox control.
JonRobertson replied to shineworld's topic in VCL
Perhaps it was a request (in Delphi 13) for a new VCL combo box control that is not a subclass of the Win32API COMBOBOX class. -
What new features would you like to see in Delphi 13?
JonRobertson replied to PeterPanettone's topic in Delphi IDE and APIs
I recently came across a company online developing AI "clones", and decided to ask an "Abraham Lincoln clone" the question "Why do you believe you were assassinated?" After giving a three or four paragraph response that I would expect from documented history, the AI then asked me what circumstances led to my assassination. That isn't artificial intelligence. That is a complete lack of intelligence. -
What new features would you like to see in Delphi 13?
JonRobertson replied to PeterPanettone's topic in Delphi IDE and APIs
Yep, I fought that headache even as a solo developer on a project. My dev machine is a laptop. The laptop's display has a different recommended scaling than the monitors attached to my docking station at the office. I would get so frustrated during commits because I only commit intentional or needed changes. I do not want commits littered with changes to Left/Top/etc due to the form designer running at a different scale/dpi. All of that headache thankfully went away after I discovered DPI Unaware mode. -
What new features would you like to see in Delphi 13?
JonRobertson replied to PeterPanettone's topic in Delphi IDE and APIs
Genuine question on HighDPI. So far, working in DPI Unaware mode works well for me. As long as the run-time handles scaling "correctly". Since switching to DPI Unaware mode, I have not needed to write (or borrow) workarounds for HighDPI issues. Are there scenarios where designing in HighDPI would be beneficial? Just to improve the development experience or to improve the user's experience when using the produced app? -
How do I upgrade from (c++ Builder) 11.3 to 12 ?
JonRobertson replied to CyberPeter's topic in General Help
Try https://my.embarcadero.com/, login, and then My Downloads (icon/button on left that looks like a cloud with a down arrow inside). -
When I code any Office app automation in Delphi using the bundled wrappers, I use the more recent one. There may be a reason to use the Office 2000 wrapper. But I've never had a reason to use the older version.
-
Has anything changed in the Delphi environment between the "original compiled dll" and the one you are testing? Such as version of Delphi and any third-party components? Is the DLL interfacing with Word through COM Automation? If so, are you using the component wrappers included with Delphi or something else? Are your tests with "original dll" and new dll each talking to the same version of Word on the same machine?
-
Register COM Object for create process/Fightiing AntiVirus
JonRobertson replied to RTollison's topic in General Help
I came across this while searching for something completely different. Although an old thread, I have a suggestion (if you have not already tried): Change your program to create .bat files in C:\coboldev to do a batch compile, say 50 compiles per batch file. Launch cmd.exe and pass it the name of the batch file. Monitor for completion, as you mentioned previously. Or have cmd.exe exit upon batch completion (cmd.exe /c comp01.bat) and wait for the created process to end. Perhaps have 10 cmd.exe processes running simultaneously performing batch compiles. And delete each batch file once the process completes. This may solve the slowness cause by the AV scanner, if it is having fits about separate processes being created for each launch of ccbl32, but not when launched several times by a single process. You could also try using a language/tool more powerful than cmd batch, such as PowerShell or Python, to prompt which folders to compile and launch ccbl32 for each file. Or roll your own CI by comparing timestamps of the source against the most recent compiled module. Or try a tool like Jenkins. Lots of options. -
Using AInitialCount and AMaximumCount values of 1, the semaphore may only be acquired "one time" and other calls to Acquire will block until the semaphore has been released by calling Release. You could call GlobalSemaphore.WaitFor(1) and check the result for wrTimeout. But that only tells you that the semaphore was already acquired when the call as made. The semaphore could be released, and possibly acquired by a different thread, before you called Acquire again. I hope that makes sense.
-
Vcl.ExtDlgs was compiled with a different version of Vcl.Dialogs.TOpenDialog?
JonRobertson replied to alogrep's topic in VCL
You want to look for Vcl.ExtDlgs.* and Vcl.Dialogs.* Do you recall modifying either Vcl.ExtDlgs.pas or Vcl.Dialogs.pas? Do you have multiple versions of Delphi installed? Are your library and search paths set correctly? The compiler is finding versions of those two units that are not compatible. This primarily occurs when the interface section of one unit does not match the interface that the other unit was compiled against. -
Take a look at PrintWindowExample. I opened the project in D11, hit F9, and it worked. It does not take a screenshot of the current app, but hopefully it will help you with your code.
-
I do not see it in standard Delphi RTL/VCL units. However I did find it defined elsewhere. const PW_CLIENTONLY = $1;
-
I do the same thing with ADO, preferring MSOLEDBSQL if it is installed. Although not my actual code, the code below does the job. In my case, I dynamically update the ADO Connection String before connecting to SQL Server. function GetADOProvider: string; const PREFERRED_SQL_PROVIDER = 'MSOLEDBSQL'; SQLOLEDB_SQL_PROVIDER = 'SQLOLEDB.1'; begin var lstProviderNames := TStringList.Create(); try GetProviderNames(lstProviderNames); if lstProviderNames.IndexOf(PREFERRED_SQL_PROVIDER) > -1 then Result := PREFERRED_SQL_PROVIDER else Result := SQLOLEDB_SQL_PROVIDER; finally lstProviderNames.Free(); end; end;
-
I wouldn't say FireDAC succeeded ADO/dbGo. I would agree that FireDAC succeeded dbExpress. As far as I know, FireDAC uses SQL Native Client, which Microsoft deprecated, I think in 2019. Microsoft no longer updates it or supports it and Native Client is not fully compatible with newer versions of SQL Server. There is a QC to add support for MSOLEDBSQL to FireDAC, but that QC was closed. RSP-32494
-
When you say "manipulate table", do you mean insert/update/delete data in the table? If so, nothing special is needed. Use the Insert, Edit, Post, and Delete methods of TADODataSet. If you are modifying the structure/schema of a table, you can do that with SQL statements using TADODataSet or TADOQuery. In that scenario, I recommend setting the ExecuteOptions property to [eoExecuteNoRecords]. The CommandType property specifies whether CommandText contains SQL Text (cmdText), the name of a table (cmdTable), the name of a stored procedure (cmdStoredProc), or the filename of a dataset persisted on disk (not in a database). Best practice is to avoid cmdTable, or the equivalent component TADOTable, as that doing a SELECT * FROM and will always retrieve all rows and all columns. Best practice is to limit the SELECT to only the columns needed.
-
Copy your patched FMX.Platform.UI.Android.pas to the same folder containing your project. You could also add it to the project. Delphi will compile and use the one in your project folder rather than the version shipped with Delphi. If you need to use this for multiple projects, or later need to patch another FMX unit, you could create a folder named something like FMXOverrides. I don't use FMX but I've had a VCLOverrides folder for years.
-
CreateSemaphore/FileLock etc
JonRobertson replied to hsvandrew's topic in Algorithms, Data Structures and Class Design
I used CodeSite Express (and later upgraded to full version) for years at a previous job. It worked well for our needs. @hsvandrew CodeSite Express can be installed via GetIt Package Manager. There are a couple others that I came across that you may want to investigate: loggerpro and SynLog There is also SmartInspect. Although not free, there is a trial version available. -
Network scan in Delphi (Windows), get MAC addresses
JonRobertson replied to ErikT's topic in Network, Cloud and Web
Age is relative. Fwiw, I'm 51 and started "hacking" (and learning) BASIC on a Commodore PET in 1981. -
Network scan in Delphi (Windows), get MAC addresses
JonRobertson replied to ErikT's topic in Network, Cloud and Web
I disagree. In my opinion, hack/hacker/hacking has never been a bad thing. Hacking is a terrific way to learn, especially for self-taught individuals such as myself. Sure, people have done a great deal of malice, which is unfortunate. And believing that all hackers are malicious is an unfortunate side effect of the harm caused by others. -
Network scan in Delphi (Windows), get MAC addresses
JonRobertson replied to ErikT's topic in Network, Cloud and Web
You could try another set of Internet components, such as ICS. I have not needed low-level Internet functionality for a while. But I used to use ICS quite a lot. Internet Component Suite ICS is available for VCL and FMX. In recent versions of Delphi, it can also be installed via GetIt Package Manager. -
Network scan in Delphi (Windows), get MAC addresses
JonRobertson replied to ErikT's topic in Network, Cloud and Web
I suggest searching using a search engine. You will find several results. The most common approach is to calculate the IP range for your LAN using the computer's IP address and subnet mask. Once you know the range of IP addresses for the LAN, ping each IP address. For better performance, use multiple threads to ping several addresses simultaneously. Note that just because ping does not receive a response does not mean that there is not a device at that address. Not all devices respond to ping requests. If you want to "search deeper", you could scan a port range for each IP address. Although that would take significantly longer. If you are looking for a particular device or application, you may be able to find out what it uses for network discovery, such as Apple's Bonjour. If you are wanting to discover your own applications running on other machines within the network, take a look at UDP broadcasts (servers and listeners). -
No difference. It is either personal preference or, in a professional setting, a team policy or design decision. I prefer field names to be "CamelCase". For example, FirstName. I prefer this for variables and class members as well.
-
https://docwiki.embarcadero.com/ is also down.