

timfrost
Members-
Content Count
212 -
Joined
-
Last visited
-
Days Won
3
Everything posted by timfrost
-
Yes, you are right. This code is so old that I had forgotten that GetProcessWindow is in a library function I borrowed from somewhere else, and which as you say uses EnumWindows. And thanks for the Raymond Chen link; luckily no problem has ever surfaced and this small program is anyway about to be dropped because it is used to configure a service which has reached EOL.
-
In one of my applications I also need just to show a console window in a tab or panel, and I also have no need to capture its output. It's a rarely used option, not a central part of the application. You can get the command window handle by calling GetProcessWindow(pi.dwProcessID), where pi is the PROCESS_INFOMATION available after calling Create Process; and then calling SetParent to set the parent of the command window as your target component. You will also need to call SetWindowPos with the command window handle to position and size the command window over the target component. It's not very pretty, and there may well be more elegant ways to do this, but it is simple, and has been sufficient for me over several Delphi releases up to and including 11.
-
Winsoft have two OCR solutions for Delphi, one using a DLL and one the Windows RT OCR API. https://www.winsoft.sk/ocr.htm and https://www.winsoft.sk/rtocr.htm. I have not tried either, but they do have a demo and are reasonably priced with no ongoing usage charges.
-
Scanning for files while they are created or deleted
timfrost replied to Marus's topic in Windows API
If you are concerned about performance, use the options in FindFirstFileEx to use a larger buffer and not to return 8.3 filenames. -
serialize/deserialize data with RTTI
timfrost replied to o815's topic in Algorithms, Data Structures and Class Design
You might like the Grijjy implementation of Google Protocol Buffers: https://blog.grijjy.com/2017/04/25/binary-serialization-with-google-protocol-buffers/ -
My CPU is an Intel core i7-11700, and I can reproduce the same symptoms here with Ian's source file on an AMD Ryzen 7 3700X, where Delphi is 10.4 and GExperts is 1.3.21.3833. But not on Delphi 10.3 with GExperts 1.3.14.80, which runs on a core i7-6700T. On the older machine the formatter runs with or without the comment. My guess is that this may be related to the formatting settings; perhaps both Ian and I have settings that you do not. I tend to copy and review my settings manually from IDE to IDE, but 10.3 might be different. And I do not remember whether there is an easy export/import settings mechanism for me to send you my settings to test. I don't really want to update my own GExperts at this moment. I do not normally put comments at the end of interface lines so the problem does not affect my formatting. I only researched the issue because it seemed an interesting bug, and might have been related to the apparently intermittent 'formatter does not run in 11.3' issue which I fixed in February by building from source, following your suggestion here then.
-
I can reproduce the same problem with your unit (but not with any of my own). My GExperts build reports itself in 'About' as "1.3.22 build 4008". I think I built this from source back when 11.3 first came out (see another topic here) but I see the same issue (and the same build number 4008) in your unit with the installer with the name 2023-03-25. Although no formatting of your unit takes place, either with the keyboard shortcut or the menu, the IDE offers to save it on close, so believes something has changed. If I remove your comment on line 22, the formatter works correctly. Adding a comment at the end of an interface function definition in one of my own units also makes the formatting fail to take place. So this looks a bit like a data-related formatter bug. I will see if I can find 1.3.23.4026 and try that also.
-
Can you not find a better 'text extractor' which produces more useful output?
-
Something has recently broken my object inspector in Delphi 11 update 3, running on Windows 11. If I click in any field, for example 'LeftMargin', the value is highlighted, but digits I type do not appear, and I cannot select any other field until after have pressed the Enter key, when the typed number also appears. If I had last pressed up-arrow, the value next above in 'Left' is highlighted, and again I need to press Enter before I can select any other item. If I have clicked in another item before pressing Enter, the click has been remembered, and the focus moves to the last clicked item when I press enter to clear the original selection. My only items in the Experts registry list are Beyond Compare and GExperts, and removing them and restarting the IDE does not fix the issue. The problem affects all projects and forms, even brand new ones. I have found no other applications affected. Rebooting changes nothing. What should I try next? The Object Inspector is effectively unusable.
-
Thanks; but as is often the case, just posting a question is sufficient to find the solution. I remembered that I had been experimenting with Windows compatibility properties for BDS.exe as well as with -highdpi:unaware a week or so ago (and, unusually, had not used the IDE much since). And now I find that it is overriding high DPI in the Windows properties dialog that attacks and damages Object Inspector keyboard and mouse actions, and this setting had been accidentally left in place; it has a similar effect on the display of the form in the IDE as -highdpi:unaware. So I hope this thread may help someone else one day, but discovering my error has restored my sanity along with that of the IDE.
-
PlusMemo is an enhanced memo component for Delphi and CBuilder, with comprehensive syntax highlighting features. I have been a satisfied user for 20 years and have recommended it here in the past. Powerful, fast, and simple to specify keywords and syntax elements, with samples for some common file types such as HTML, and with various editor-related utilities included. And of course the good set of user editing features that you would expect in a high-quality editor. I just discovered that it has recently become 'free with source', with packages for from D2009 to Alexandria. Definitely worth a look, at ecmqc.com/plusmemo/pmHome.htm, if you need any type of syntax highlighting editor in your applications.
-
Have you found a way to suppress the welcome page in 11.3 ? I cannot find a setting for this.
-
I am now back to getting this problem also. Not yet managed to find a trick to make it work. It fails to run with the defined keystroke (I have tried defining others without success) and with the menu.
-
You are still trying to write 70001 entries (0 to 70000) into a 70000-byte array. That it reports an error when you pass the end is the expected result.
-
I have once seen that symptom. No formatter, close, open, formatter; and vice versa. Only once. No involvement of Xplorer2. It was before I upgraded from 11.2 to 11.3, and I think I put it down to running the IDE as admin. In 11.3 I made sure to run the GExperts install batch file as admin, after I had rebuilt GExperts as mentioned in another thread.
-
I have Xplorer2 installed and I cannot reproduce any problem with the GExperts formatter when starting Delphi second (or first). I have gone back to Directory Opus and no longer use X2, so if it was intermittent I might not have noticed it.
-
Early days, but it looks as if the formatter is dead in 11.3. No action on keystroke or menu. Some other editor experts are still working.
-
Rebuilt with 11.3 and panic over! I might have had to drop back if there was no GExperts formatter. Also visited the donations page.
-
Yes, after the 11.3 install when I open the IDE everything comes up as usual, including GExperts. I will try a rebuild next.
-
If what you describe happened to me, I would start by running Process Explorer on the system where it works, highlight the EXE and press control-D. One or more of the DLLs listed in the lower pane will be missing from the system where it fails. Tedious to check them all, but you may spot something obvious.
-
How to enter unicode symbols into the Delphi IDE
timfrost replied to Dave Novo's topic in Delphi IDE and APIs
The PowerToys utility really only does accents and I found it inflexible when I tried (and then abandoned) it. I use Wizkey from https://antibody-software.com/wizkey/ even though it has a small cost (and a free trial). Easy to use either from the keyboard or from a popup menu, which I have set to pop up with two presses of the Control key. This menu is customizable so you can ensure your commonly needed characters are immediately to hand, without having to remember a Unicode value. The menu has an option to show a full char-map for selection also. Of course it works everywhere, not just in the IDE. -
How do I have version 5.1.8.360 installed when your own link above is only to 5.1.7 ?
-
That could be because it is a different language! The calling and using is the easy bit: once you have added winapi.windows to your uses list, the Delphi IDE shows you the parameters and their types when you write the function name. And Google finds you precise details of how the API function works when you enter MSDN followed by the function name. But I am not the best person to tell you what functions you can use, even if you had told us what features (other than starting/stopping services) you want to use them for. Having been a C programmer since long before I even discovered Delphi 1, I no longer remember how I learnt about the Windows API. Hopefully someone else will point you towards a more up-to-date resource to learn about it..
-
While switching to a new machine I have identical installations of Delphi 10.4 and 11.2 on Windows 10 and Windows 11. Only on Windows 11, the GExperts Code Formatter ignores whatever key combination is assigned to it, when the IDE is run elevated. This is annoying, because I often have to work in an elevated IDE to debug an application that requires elevation. The GExperts folder and its contents are identical, as are the registry keys for GExperts and the configuration settings. Other keystroke combinations configured in GExperts are unaffected, as are operations when the IDE is not run elevated. What might cause this, and might there be a way to avoid the problem?
- 4 replies
-
- windows11
- elevated ide
-
(and 1 more)
Tagged with:
-
No GExperts formatter on Windows 11 with elevated IDE
timfrost replied to timfrost's topic in GExperts
Good question! In the many years that I have been using GExperts, I have never enabled Editor Experts on its main menu, so I had forgotten it was there. I had ruled out a problem with a stolen keyboard shortcut because I had tried so many different combinations. And my standard shortcut for the formatter (Alt + accentgrave) has never been stolen before. Now, it works from the menu. And, it also works from the keyboard. So your excellent suggestion has not actually added to my knowledge of what the problem was, although I now have normal service resumed. I have a habit of writing new code without too much care for neatness, then pressing the 'format' key to tidy up and check that all the begins and ends line up. I suppose I have done this since DelForEx was standalone. If it happens again, I will have to go back to looking for something that might have stolen the elevated-only keystroke yesterday and today, that is not running now. I have been round this circuit before.- 4 replies
-
- windows11
- elevated ide
-
(and 1 more)
Tagged with: