Jump to content

Tom F

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Tom F

  1. Tom F

    Parallel Resampling of (VCL-) Bitmaps

    It's nice to see GR32 getting some TLC! Thanks, all.
  2. Hi, David, ImageEn may be more than you want to spend on a hobby project. (It was a few hundred dollars several years ago when I bought it.) But the announcement below is pretty exciting. Whether you use it or not, I wanted to post this somewhere here so that others who might be interested would see it too,
  3. Quite a few years ago I played with Mitov's Vision Lab, which is part of his suite. I never needed to use it, but it was pretty exciting for me to see what it offered for object tracking. There are some downloadable demos here: https://www.mitov.com/products/visionlab#screenshots
  4. We have used https://www.mitov.com/products/videolab#overview for 13 years. Excellent library to which I owe my company's product's success on Windows and macOS. His tools are threaded, which means you get maximum through-put and the VCL doesn't freeze. Free trial and free to non-commercial organizations. The installer puts some demo programs here C:\Program Files (x86)\Embarcadero\Studio\22.0\LabPacks\Demos. You'll find one there that lets you process frame by frame either a live feed or file playback. Just drop a few components on a designer, hook them up, and grab the "Frame Ready" event to process your data. Check out some of his other tools. He has some real-time tools that do pattern recognition and may be all you need. Boian Mitov is brilliant, IMO. His tools are the best we could find. No royalties necessary. No confusion about FFMPEG patent licensing, which we always worried about. The attached sample has a video feed (of a telescope spectrometer) on the left and some data extracted on the Mitov plot on the right. Tom
  5. When using a style (e.g.Windows10), the dialog that is displayed by the code below is not resizable. (i.e. There is no handle in the lower right corner with which to drag the window larger.) When using the default Windows style or removing the Options line from the code, there is no problem. We had hoped to start using styles in our app, but a bug like this is discouraging. var SaveDialog1: TSaveDialog; begin SaveDialog1 := TSaveDialog.Create(Self); SaveDialog1.Options := [ofOverwritePrompt]; // removing this line eliminates the problem SaveDialog1.Execute; SaveDialog1.Free; end; Windows 10, D11.1, 32-bit app. Reported here https://quality.embarcadero.com/browse/RSP-38868 Edit: I decided to add a screen capture showing the missing grab handle to resize. I've noticed that when using a style, the dialog box that is missing the grab handle is a different type. It has icons on the left rather than a directory tree. It appears that the VCL Styles changes the dialog box type. What's the difference? Is there a way to show the "old style" (with a tree) when using styles??
  6. Tom F

    TDialogService.MessageDialog translation

    I do not develop on iOS or Android so I am unable to answer that question, Nico.
  7. Tom F

    TDialogService.MessageDialog translation

    I'm not sure if this is what you're looking for, but see https://www.swissdelphicenter.ch/en/showcode.php?id=946, where we found the code below. We've been using this code from there for more than ten years with no problems: procedure HookResourceString(rs: PResStringRec; newStr: PChar); var oldprotect: DWORD; begin VirtualProtect(rs, SizeOf(rs^), PAGE_EXECUTE_READWRITE, @oldProtect); rs^.Identifier := Integer(newStr); VirtualProtect(rs, SizeOf(rs^), oldProtect, @oldProtect); end; const NewOK: PChar = 'New Ok'; NewCancel: PChar = 'New Cancel'; initialization HookResourceString(@SMsgDlgOK, NewOK); HookResourceString(@SMsgDlgCancel, NewCancel);
  8. I just did a new install of D11. I am trying to put View, Toggle Form/Unit on a toolbar. However, on the Customize screen, Toggle Form/Unit doesn't appear. Does anyone have any suggestions on how to get it back?!
  9. That fixed it, Uwe! (So obvious once you know it!) 🙂 THANKSfor you help.
  10. Tom F

    Change the background color of a TEdit

    I prefer to read rather than watching YT too. However, these days I find many solutions are on YT rather than in prose. I often play YT videos at 1.5 or 1.75 speedup so I don't waste as much time.
  11. Tom F

    Change the background color of a TEdit

    If you found this thread like I did while you were looking how to change the background color on a single control in a VCL style, see this video:
  12. I'm going to have a light style and dark style in our D11, VCL, app. Question 1: What's the recommended way to handle TToolButton 32x32 images being different in an app where the user can switch between a light and dark style? What would be a good way to change a TToolButton's image from an image that is designed for a light style and an image that is designed for a dark style? Perhaps if I have two TImageLists, can I just do this Toolbar1.Images := ImageList1 or Toolbar1.Images := ImageList2; ??? Or perhaps I can change the ToolButton image as in ToolButton1.ImageIndex := 8 or ToolButton1.ImageIndex := 2; ??? Is some sort of refresh necessary to force an assignment like the above to be applied? (I can have the user shut down the program if it's necessary for the assignment to occur before the toolbar is created, doing it in in TForm.Create before the TForm's TFrame is created?) Question 2: Transparency! Should I use it? I'm wondering whether I ought to just have our graphics designer create two sets of buttons not using transparency, hardwiring the button image's background to either a light or dark color rather than relying on transparency. And I wonder that because I'm having trouble understanding how alpha colors work. https://docwiki.embarcadero.com/RADStudio/Sydney/en/Image_List_Editor says: So I created a TBitMap with a green circle and reddish background that I want to be transparent. This is it (and attached as circle2.bmp.) But when I add the image in the ImageList editor, the circle has a red tinge remains around it in the editor and button. Have you faced either of the two issues above? circle2.bmp
  13. Tom F

    Changing TToolButton image and using transparency

    Congratulations, Davide, on what sounds like a great approach. What tools are you using to show the SVG files? (I see some here: https://www.ideasawakened.com/post/simple-svg-images-in-delphi-applications) Are you using them in toolbar buttons?
  14. Enabling styles in our D11 app results in a flash when we open sub-forms. The only discussion I've found on this is here, but the solutions discussed there dont' work for me. Any suggestions on how to eliminate the flash. Example of flash: flicker.mp4
  15. Tom F

    Flash when showing form with VCL Styles

    Thanks for your helpful feedback @Dalija Prasnikar @Uwe Raabe @Darian Miller.and others. I created a tiny test program that has the same flashing problem on the main form and subform. I tested it on another machine, and on a VM on my machine and there's no flashing! WTF?! I updated all my monitor drivers and the problem remains on my computer. It's hard to know how frequent or rare this problem will be in the field. ¯\_(ツ)_/¯ I'm going to post the source in a new thread and ask for members to download, compile, and test. Thanks again for taking the time to respond to my OP and for all your contributions to our community. Tom
  16. Tom F

    Flash when showing form with VCL Styles

    Thanks, @Darian Miller. In my opinion, Delpih Styles is worse than worthless as long as the flicker is there. If my software exhibited this kind of flicker, it would be laughed at by our customers. There's no way I use Styles as long as this defect continues to exist. I'm disappointed that EMB would pretend that this feature works.
  17. Tom F

    Changing TToolButton image and using transparency

    @aehimself Very clever approach. Thanks for sharing it.
  18. Tom F

    Changing TToolButton image and using transparency

    I'm always wary of "just trying it" because I worry that my testing might fail to uncover some problem context that I wasn't aware of. But, I answered my OP question #1 here by, um, just trying it. The line below causes the VCL to refresh all Toobar buttons with the contents of the ImageList. ToolBar.Images := ImageList; So, if my user switches from a Light to a Dark style, I can use the above code to switch to a different set of toolbar icons. I asked my OP question #2 very poorly. I know very little about image files, alpha channels, etc. Here's the question rephrased: I am going to hire a graphics designer to design 32x32 icons for a toolbar similar the DIY-designed 16x16 ones below. Since we are going to allow the user to select a light or dark VCL style, is my thinking correct that we probably need a second set of similar icons, but designed for dark styles, especially if our icons us a lot of transparency for their background. Otherwise, on a dark style, using icons that work on a light style like the above looks terrible, like this: I will be adding the files that the graphic designer delivers to two ImageLists used by a Toolbar and its ToolButtons. We are not going to support different DPIs at the current time. I plan to ask the designer for the same icon twice, one icon that looks good on a light background and one that looks good on a dark background. What else do I need to ask the designer given the above scenario? What file type, what about transparency? When adding these files to the ImageList, how do the Transparent Color and Fill Color fields (below) come into play? How do I avoid the kind of red shadow shown below from occurring? (The source file for the image below is in the OP as circle2.bmp.) I want to be able to give my designer clear instructions on the format of their deliverable. Something like: "We want you to deliver color, 32x32 png files with an alpha channel for transparency" Are png files the file of choice for a project like this or does another file type work better? Is there anything else I need to tell the designer? Am I over-thinking this?
  19. I can't get Code Completion to work. It pops up suggestions when I type a period after an object name. But, when I type a standalone variable name, I want it to offer a list of matching variables. For example, in an empty project, when I type "Vari" below, I want it to automatically suggest VariableName. Or must I always hit CTRL-Space for that list? procedure TForm1.FormShow(Sender: TObject); var VariableName: integer; begin Vari end; Is there some configuration option I've missed enabling? This is in D11 with Update 1. My configuration:
  20. Hi, Sherlock, I disagree with you. I don't think styles are a toy or a waste of EMB time and money. Styles are a necessary tool to allow us developers to modify our apps. I agree that massive changes are ill-advised and will confuse the user. But many modern apps (including the IDE) have a dark mode, which is what we are using styles for. We're not going to make massive changes to the UI that would confuse the user.
  21. Uwe, yes, undoubtedly there is some subjectivity to this. UI design is going to be personal to some degree. However, IMO, that doesn't negate the value of hearing about other people's experiences.
  22. Thanks for the clarification, Remy.
  23. Also note, aehimself, that StrToFloat will cause an exception if scGPDBEDit82.Text is not a valid floating point number. To avoid that, you could use https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.SysUtils.StrToFloatDef If the conversion fails, the default is returned instead.
  24. THANK YOU. Thank you, Remy. As usual, you're a fount of information! I appreciate you're having taken the time to answer this question. And of course I also appreciate all the contributions you have made over the years with your software and with your participation in the forums. Insert other media
  25. Thanks, Sherlock. I thought I recalled an auto-invoke that would make suggestions without my having to press a special key (or type .) I guess I was mistaken.
×