Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. Attribute syntax demands true constants
  2. David Heffernan

    Convert Double to Real

    Given this definition type Real = Double; I'd say you don't have much to fear. Of course, this code doesn't compile.
  3. David Heffernan

    TListView filled by Thread = Freeze

    Why do this in a thread? Seems like much complexity for no possible gain.
  4. David Heffernan

    AllocHwnd + TTimer = lag?

    It's not going to be sent many messages. Can you reproduce the behaviour in a cut down program?
  5. David Heffernan

    Get rectangle of the button that was pushed on another form...

    The setup is pretty opaque for us here. These are the sort of details that matter. Without them it's just guesswork.
  6. David Heffernan

    Get rectangle of the button that was pushed on another form...

    Make a note of the coordinates in the code that handles the button click event, and pass that on to other other code. I'm assuming that you are in control of all of the code.
  7. David Heffernan

    Alfabetical order of a letter

    You should check that Length(Str)=1. This fails of course, it doesn't compile. But it's not the code that was suggested. You should take more care when copying code.
  8. David Heffernan

    Alfabetical order of a letter

    Wbat if there are more than 26 columns?
  9. Seems like you should be building the GUI in code rather than the designer.
  10. David Heffernan

    Running .Net Standard Assembly

    Who are you hoping does this? i.e. who is "you" in your question?
  11. David Heffernan

    Calling a Delphi DLL from LabView

    Nah, that's not going be to the cause of the error reported in the original post. Hard to say what is the problem though without knowing the other side of the interface. How can we know how the function is declared in labview? My expectation is that the real issue is a mismatch at the binary interface layer.
  12. David Heffernan

    Physically reduce jpeg image size??

    The thing is, both resizing and compression will change the image and only you can judge which you prefer. It depends on what you are trying to do with these images, what sort of images they are. In my view you need to engage with that side of things first, not in a coding setting, to work out precisely what transformation you want. Then implementing it in code should be simple.
  13. David Heffernan

    Physically reduce jpeg image size??

    Do you want to resize the image or increase the compression? And which framework, vcl or fmx? And if you want to resize, what resampling do you want to use?
  14. It's also pointless to use SetLength in this code because you then throw that array away and replace with a new one.
  15. David Heffernan

    SysUtils, AnsiString

    That returns a UTF-8 encoded byte array which you can copy into your record. Are you familiar with TEncoding, it's a somewhat import tool for text encodings?
  16. David Heffernan

    SysUtils, AnsiString

    TEncoding.UTF8.GetBytes
  17. David Heffernan

    SysUtils, AnsiString

    TEncoding.UTF8.GetBytes You don't need to use AnsiString.
  18. You shouldn't. It makes absolutely no sense.
  19. David Heffernan

    Binary size, how-to make it smaller?

    If you really need to do this then you probably need to switch to a different tool, or use an old version of Delphi. Modern Delphi just produces huge executables. Or you could just decide not to worry about a few MBs.
  20. David Heffernan

    Interfacing Unicode string to DLL PAnsiChar

    Don't rely on whether or not a function is inlined in order for the code to work. After all, it might not be possible to inline it.
  21. David Heffernan

    Range check error.

    Maybe worth digging a bit deeper. There seem to be a good few discussions on SO. I'm probably talking nonsense about a race, but I also bet that wait + GOR isn't right.
  22. David Heffernan

    Range check error.

    Doesn't the original code have a race?
  23. David Heffernan

    64 bit compiler problem

    Answer likely to be found in the source code
  24. David Heffernan

    64 bit compiler problem

    It is removed from the stack when the method returns. I don't think you've got to the bottom of the issue yet.
×