Jump to content

Fons N

Members
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    3

Fons N last won the day on March 17

Fons N had the most liked content!

Community Reputation

17 Good

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I found this website to be very helpful. https://www.physiologyweb.com/delphi_code_examples/microsoft_excel_automation_with_delphi.html
  2. Fons N

    optical character recognition

    On the contrary, I would take a Delphi component over a DLL anytime. My point is, transym.com does not sell a Delphi component anymore (at least not with it's latest version, which is at version 5). https://transym.com/download/ If version 5 would be available as a Delphi component, than there would be Delphi samples. There are none. Version 4 has Delphi samples, but only for 32 bit. I downloaded them, but unless I am missing something, it is still not a Delphi component. Maybe version 3 is, but the website states that the latest update of these Delphi samples where updated in December 2011. That is a long time ago. I know code doesn't rust, but as it is clear there won't be any updates that specifically supports Delphi, I would think twice before using it. A shame, cause the price, it's unrestricted use and what it can do, would be a top choice if you need OCR - if only it would be an actual Delphi component.
  3. Fons N

    optical character recognition

    As far as I can tell from looking at the website, this is not the case anymore for newer versions of TOCR (currently art version 5). Last version that unofficially supported Delphi was version 4 and even in version 4 is not a Delphi component (looking at the source code examples).
  4. Hi, Just upgraded to Delphi 11.3. Just wondering if you guys have the same problem as me regarding the LSP. To be clear, I had this problem also in earlier versions, but was hoping it would be fixed in 11.3. In a small application, this problem does not occur. But in a big application it does. The problem is as follows: If I type in the first few letters of a variable, use Ctrl+Space, the little window pops up displaying the possible variables and routines. Great. Even in the big application. For example: obja it will find (among others) ObjAdministration But... if I type this: if obja nothing. No popup window. I am now so accustomed to typing in first obja and then use Ctrl+Space, select the variable or routine I need, type the Home key twice and then type if. It's a workaround, better than typing in the whole variable or routine, but it is annoying. Do any of you have the same problem?
  5. Fons N

    Never mind... found it.

    Sorry.
  6. Fons N

    KeyDown and Shift state

    It is to "jump" within different "parts" of the same control. But, if I need to it to be between or over controls, I will keep your suggestions in mind.
  7. Fons N

    KeyDown and Shift state

    It's works perfectly ! Thank you very much, Remy, it is really appreciated. I wouldn't have figured it out for myself. Thanks again !!
  8. Fons N

    KeyDown and Shift state

    Thanks, I understand, but as the code is inside the following if Key = VK_LEFT then begin end; it won't be executed twice.
  9. Fons N

    KeyDown and Shift state

    I am not a professional programmer. I looked SendInput up SendInput function (winuser.h) - Win32 apps | Microsoft Learn But I cannot make heads or tails of it (if that's the correct expression - I am Dutch) So after some searching I found this type conversion - Delphi keypress and keybd_event - Stack Overflow Keybd_Event(VK_SHIFT, 0, 0, 0); Keybd_Event(VK_TAB, 0, 0, 0); Keybd_Event(VK_TAB, 0, KEYEVENTF_KEYUP, 0); Keybd_Event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); With the example code I have tried to translate the Keybd_Event code. But unfortunately it does function (behave) the same. At least my application did not crash. class procedure TRoutinesEx.ShiftTab; var Inputs: array[0..3] of TInput; begin Inputs[0] := Default(TInput); Inputs[0].Itype := INPUT_KEYBOARD; // Inputs[0].ki.dwFlags := KEYEVENTF_KEYUP; Inputs[0].ki.wScan := VK_SHIFT; Inputs[1] := Default(TInput); Inputs[1].Itype := INPUT_KEYBOARD; // Inputs[1].ki.dwFlags := KEYEVENTF_KEYUP; Inputs[1].ki.wScan := VK_TAB; Inputs[2] := Default(TInput); Inputs[2].Itype := INPUT_KEYBOARD; Inputs[2].ki.dwFlags := KEYEVENTF_KEYUP; Inputs[2].ki.wScan := VK_TAB; Inputs[3] := Default(TInput); Inputs[3].Itype := INPUT_KEYBOARD; Inputs[3].ki.dwFlags := KEYEVENTF_KEYUP; Inputs[3].ki.wScan := VK_SHIFT; SendInput(Length(Inputs), Inputs[0], SizeOf(Inputs)); end; Guess I did something wrong. But I am clueless...
  10. Fons N

    KeyDown and Shift state

    In a KeyDown event (VCL) I have the following code: procedure CodeExample.KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = 37 then begin Shift:= [ssShift]; Key:= 9; end; if Key = 39 then begin Shift:= []; Key:= 9; end; end; The code in the Key = 39 part works. The pressed key is now a tab. The code in the Key = 37 part however does not work. Yes, the pressed key is still a tab, but the state of the Shift key does not act like it is pressed. I have the KeyPreview set to TRUE in the Form. I guess I am doing something wrong here... Most likely that Shift can only be read, so it is the state when the key was pressed and it cannot be used to actually set the Shift key to a specific state. How can that be done? Any help is appreciated. *** UPDATE *** I have found the following code: Keybd_Event(VK_SHIFT, 0, 0, 0); Keybd_Event(VK_TAB, 0, 0, 0); Keybd_Event(VK_TAB, 0, KEYEVENTF_KEYUP, 0); Keybd_Event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); This does the job. Is this the best way ? And is it "future" proof ?
  11. DevExpress Spreadsheet. Is there an option to suppress the exception message "The cell that you are trying to change is protected and therefore read-only." ? Or even better, that it does not occur at all. I can "catch" the exception, but I prefer that is does not occur at all. In WinForms there is the SpreadsheetControl.ProtectionWarning event, but this does not exist in de VCL version. I have a central exception handler in my application using the ApplicationEvents component. I can detect this exception there, but - again - it would be better it does not occur at all. As far as I can tell, there is no way I can catch the exception locally in code because the exception is triggered by the user. Hope someone has a solution.
  12. Fons N

    Need help with exception messages

    Sorry, I presumed from the call stack it would be clear that it is from the FastMM source code. My bad. None of my own units have a finalization section. So, it either must be from the Delphi source code, the FastMM source code or from the 3rd party source code. The good thing about it, is that it's not my code that is faulty, but the bad thing about it, is that it's way more problematic to solve (from mine point of view at least). As for the madExcept setting, I will do that. Thanks for the advice.
  13. Fons N

    Need help with exception messages

    I hardly ever use that, but you are right. It happened again and this is the call stack. And this is the line the debugger shows: FillChar(PFastMM_DebugBlockHeader(Result).DebugFooter_FreeStackTracePtr^, LStackTraceDepth * SizeOf(Pointer), 0); As already said, it only happens when I close the application. And as far as I can tell, it does not have anything to do with my code. As I only use FasMM_FullDebugMode.dll in debug mode (no pun intended) I just must except this as an inconvenience. BTW, I also installed madExcept but it did not report an exception. That might have to do with the option "enable IDE exception catching" which I did not enable. Not sure, though. Thanks for your help. If you have any other input, again, it is much appreciated.
  14. Using Delphi Pro 11.2. The following exception messages occur frequently but not always. The important thing is, they ALWAYS occur when I close the application (the application is started in Delphi in debug mode). Project Recon.exe raised exception class $C0000005 with message 'access violation at 0x073302E8: read of address 0x62C8CA2D'. Project Recon.exe raised exception class $C0000005 with message 'access violation at 0x073302E8: read of address 0x62C8B12B'. Delphi generates a detailed map. Below a very small piece for illustrating purposes. Class 0001:00401000 017BD1B4H .text CODE 0002:01BBF000 0000B8F0H .itext ICODE 0003:01BCB000 0008C850H .data DATA 0004:01C58000 00042708H .bss BSS 0005:00000000 00000058H .tls TLS 0006:00400000 00000000H .pdata PDATA Detailed map of segments 0001:00000000 00010D80 C=CODE S=.text G=(none) M=System ACBP=A9 0001:00010D80 00000C9C C=CODE S=.text G=(none) M=SysInit ACBP=A9 0001:00011A1C 000028F4 C=CODE S=.text G=(none) M=System.Types ACBP=A9 0001:00014310 00000B2C C=CODE S=.text G=(none) M=System.UITypes ACBP=A9 0001:00014E3C 000036F0 C=CODE S=.text G=(none) M=Winapi.Windows ACBP=A9 I searched the values 073302E8, 62C8CA2D and 62C8B12B from the exception messages in the detailed map, but none of them can be found. I was hoping for a clue which component or part of the code the exception was related too. But, alas, no help here. If these exception message occur and right after I start the application again (from Delphi in debug mode) by pressing F9 without modifying anything, then all works fine. The application can be closed without any exception message. Nothing changed, but now it closes fine. In one way this good, but in another way, it is not, because it now seems even more difficult to solve the problem. When this happens, I also start the application by clicking on the executable from the Windows Explorer. I can start, do something, and close the application without getting any error. Does this scenario seem familiar to you..? Might is just be an issue with the Delphi debugger or something? In other words, the exception messages do not directly relate to mine application or code. Any help or insight is appreciated.
  15. Fons N

    The Delphi 11.2 release thread

    This is spot on. Though I don't use Error Insight, the effect is of course also noticeable in Auto Completion. I never had any serious issues with LSP. But since 11.2 constantly. I kill the LSP on a regular basis now -very frustrating. Even the slightest change in a record can make the LSP go nuts. I get that in order to fix things, one must be able to reproduce the bug. But this is not some piece of code we can share and show the bug. It should not be that difficult for Embarcadero to create an example. Just put a lot of DevExpress components, TMS components (especially FlexCel for VCL), etc. in some silly project (it doesn't even have to work) and in no time they will have the same problem. They just need to make sure that the library paths reach the source code of those components.
×