Jump to content

Anders Melander

Members
  • Content Count

    2771
  • Joined

  • Last visited

  • Days Won

    147

Everything posted by Anders Melander

  1. Anders Melander

    Encrypting string

    Not that what you say aren't true, but look at the screenshots. It's Delphi 7 so strings are basically byte arrays.
  2. Anders Melander

    Special Offer for Documentation Insight

    To my knowledge there aren't any (better, that is).
  3. Anders Melander

    Special Offer for Documentation Insight

    Sure. I agree on that. It is something to consider though. In this case we are reliant on explicit support for newer versions of Delphi since this is an IDE integration-only tool and the parser also needs to be updated when the language changes. So far there has not been problems but I do worry a bit. As I said I use it myself and it does what it's supposed to do rather well but the output is beginning to look a bit dated (VS2012 style), the help is out of date (or completely missing as in the case of the latest release) and the advertised new versions has never appeared.
  4. Anders Melander

    Special Offer for Documentation Insight

    Yes, very useful. I use it on a number of projects myself. I'm a bit hesitant to recommend it though as: It seems to have gone into maintenance mode many years ago. It appears to rely on MSHTML for the editor feature and MSHTML is a dead end.
  5. If you only want to convert from PNG to BMP then just assign the TPNGImage to the TBitmap. If you want a bitmap containing two PNGs side by side (or one on top of the other), then create a TBitmap of the desired size and then draw the PNGs onto the bitmap canvas at the desired locations. Uwe's examples contains most of the necessary code. You can't. CopyRect requires a TCanvas and TPNGImage ain't got it. TCanvas is a wrapper around a GDI device handle (HDC).
  6. That didn't answer my question: Why should they? "There's little cost" isn't a reason because there's even less cost in not doing it. IMO nobody will benefit from browsers supporting this format (apart from the authors ego 🙂 ).
  7. Why should they? I mean, what's the benefit? It compresses worse than PNG and WebP and only supports 32-bit RGB(A). I agree that "it's pretty" but that's irrelevant when they already have the other formats implemented. It's even irrelevant if they hadn't.
  8. Phosphoglucose Isomerase ? https://www.abbreviationfinder.org/acronyms/pgi.html
  9. Meh. As far as I can see it just does RLE and Delta compression so it's no wonder it's faster. It's also no wonder that it doesn't compress as good as PNG (look at the benchmark numbers). Also it only handles 32 bit RGBA image data. I guess it's fine for internal application use but it's definitely not a general purpose image format.
  10. Anders Melander

    how to respond on user drag of a column border in a listview

    The column headers of a listview is in fact a separate header control owned by the listview. The column resize notifications are only sent to the parent of the header control (i.e. the listview) so in order to get at them you need to hook into the WndProc of the listview and catch the HDN_BEGINTRACK and HDN_ENDTRACK messages. I'm guessing @Remy Lebeau has some code..?
  11. Anders Melander

    Create an animated gif from a set of bitmaps?

    Ah yes, TGraphic is a VCL class. I forgot that. I don't use FMX either and I knew FMX couldn't use TGIFImage for display (since that requires TPicture/TImage) but I would have thought one could still use the non-visual stuff such as load/save and GIF manipulation. I guess not.
  12. Anders Melander

    Create an animated gif from a set of bitmaps?

    Try this: procedure MakeGIF(Bitmap1, Bitmap2, Bitmap3: TBitmap); var GIF: TGIFImage; Frame: TGIFFrame; GCExt: TGIFGraphicControlExtension; LoopExt: TGIFAppExtNSLoop; begin GIF := TGIFImage.Create; try Frame := GIF.Add(Bitmap1); // Netscape Loop extension must be the first extension in the first frame! LoopExt := TGIFAppExtNSLoop.Create(Frame); LoopExt.Loops := 0; // Number of loops (0 = forever) // Add Graphic Control Extension GCExt := TGIFGraphicControlExtension.Create(Frame); GCExt.Delay := 30; // Animation delay (30 = 300 mS) Frame := GIF.Add(Bitmap2); GCExt := TGIFGraphicControlExtension.Create(Frame); GCExt.Delay := 30; Frame := GIF.Add(Bitmap3); GCExt := TGIFGraphicControlExtension.Create(Frame); GCExt.Delay := 30; GIF.OptimizeColorMap; GIF.Optimize([ooMerge, ooCrop], rmNone, dmNearest, 0); GIF.SaveToFile('foobar.gif'); finally GIF.Free; end; end; This is just from (my) memory so I'm not sure if it compiles. It's been a while since I wrote that thing. You should be able to find plenty of examples if you search for TGIFImage.
  13. Anders Melander

    Create an animated gif from a set of bitmaps?

    Doesn't TGIFImage (the non-visual part) work with FireMonkey?
  14. Anders Melander

    List of most popular UI components for VCL

    Makes sense then. The learning curve is ...um... spectacular 🙂
  15. Anders Melander

    List of most popular UI components for VCL

    So what do you use for grids, pivots, toolbars, etc?
  16. Yes. Unless you have a reason to specify an explicit owner, you should actually specify nil to make it clear (when reading the code) that there is no owner. No. You can specify that a "child form" should be centered on the owner form (Position=poOwnerFormCenter), but it's still safe to specify nil as the owner. You're mistaken. There must have been something else going on. It's the same for all classes derived from TComponent; When a component is free'd it will free all the components it owns. TComponent is a base class of TForm.
  17. Anders Melander

    Paste file from clipboard to blob field (Remote Desktop)

    This should get you started: https://github.com/landrix/The-Drag-and-Drop-Component-Suite-for-Delphi/tree/master/Demos/VirtualFileStream
  18. IMO that's a bug since the two interfaces are distinct. I don't have time to investigate if the problem exists in newer versions right now.
  19. Yes, exactly. I just wanted to be sure that you were aware of this. Many people misunderstand what interface inheritance is. I still can't follow your example but from your description it does sound like there's a bug. Since you're not doing any hard type casts the compiler should see the problem (whatever it is) and not produce code that leads to an AV.
  20. I can't really follow your example but I noticed that you haven't assigned IFooBroker a GUID. Is that by design? Also, are you aware that inheriting one interface from another is just a convenience that copies the declaration from the base interface into the derived interface. There's no "interface polymorphism".
  21. Anders Melander

    Delphi 11, migrate or wait

    You do know that you don't speak for everyone, right?
  22. IMO you're bound to get into trouble with that design - it's very fragile. Firstly you're mixing object and interface references. If you stuck with interfaces, dropped [weak] and used some other mechanism to flag that the object was no longer valid (e.g. a lock protected flag on the object), then it would be fine. Secondly since you're using [weak] there are limits on what you can safely do with the interface reference. For example supports/queryinterface can't be used on it.
  23. Anders Melander

    UsesCleaner Issue...

    How would the pre-commit hook distinguish my manual changes from the automatic changes made by the IDE?
  24. Anders Melander

    UsesCleaner Issue...

    If you create the graph in code instead of placing it on the form then the IDE will not try to add those units to the uses list.
×