Jump to content

Fons N

  • Content Count

  • Joined

  • Last visited

  • Days Won


Fons N last won the day on December 25 2020

Fons N had the most liked content!

Community Reputation

9 Neutral

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. 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.
  2. 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 !!
  3. 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.
  4. 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...
  5. 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 ?
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. Go to Nexus Memory Manager | NexusDB and click on Version History. This is what you see. Not too difficult to understand why someone gets the impression that it is abandoned.
  12. Fons N

    Nexus Quality Suite

    I would like to receive some input from anyone who has actual and recent usage experience with Nexus Quality Suite and Delphi version 10 or 11 (not older). Stability, usability, etc. Since the product is a collection of tools, if not too much trouble, preferably comment on them separately. Any input / comment is appreciated.
  13. Fons N

    32bit vs 64bit

    True, but... the Extended type, for example, are different in 32 and 64 bit - at least in Windows. I don't know if there are other differences between 32 and 64 bit that affects the generated code. There probably are. My knowledge is limited compared to Delphi experts. For me 32 bit is fine... however, for alle purchased components and libraries I do not only want the source code, but also checks if it works in both 32 and 64 bit. Just in case Windows drops 32 bit and I need to compile in 64 bit. Just recently I was looking for a good PDF component (to create PDF files) and came across one that only worked in 32 bit, so that was a no-go.
  14. Fons N

    Remove empty event handler

    The good news... it seems to be an isolated incident, because I cannot reproduce it. If it happens again, I will save the pas and dfm files and report it here. Depending on the outcome, will then file a QR.
  15. Delphi Pro 11.2 Sometimes, you accidently click on the wrong event, it's automatically created but also automatically deleted when building and/or saving the code. This is still the case. But if you put in some code, but afterwards you changed your mind and delete all code between begin and end, then in past versions is would also delete the (now) empty event. It no longer does this. Unfortunately. Can anyone conform this?