Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 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. XylemFlow

    Windows App hosting options?

    This isn't specifically a Delphi question. More of a general Windows development and deployment question. I'm looking into the best options for hosting my application. My application is free and should be available publicly to everyone who wants to download it. My revenue model is based on advertising on my website, so I want to drive all the download traffic through my website. Of course the best option is most likely to host it on my website, but the application is fairly large and the number of downloads it high. My current web host is unlikely to provide enough bandwidth without me upgrading it. I'd also like to prevent people sharing the download link and thus avoiding visiting my website. If it was hosted on my site I would simply change the download file name every few days. What other options are there with 3rd party hosting? I have looked into using the Windows Store, but even if I make the listing undiscoverable I can't avoid people sharing the link and avoid going through my website. It doesn't look like Windows store provides a feature for changing the URL on a regular basis, and if they did how would I synch my website to the new link each time?
  2. I use .ini for language files. This makes it easy for users to create their own language files. Is there any specific advantage of the .lng format over .ini?
  3. XylemFlow

    Creating Gradient by code

    What platform are you running it on and which implementation of TCanvas? There are many issues with GPU canvas. Have you read this? https://stackoverflow.com/questions/53561919/fmx-multi-point-gradients
  4. XylemFlow

    Draw a path with winding fill mode?

    I made some progress on this by copying FMX.Canvas.D2D.pas locally and adding Path.SetFillMode(D2D1_FILL_MODE_WINDING); in TCanvasD2D.CreatePathGeometry just after Geometry.Open(Path). It works but modifying Delphi code is a horrible solution and to be able to switch fill mode at run time I would also need to add a property for it in TCanvas in FMX.Graphics.pas. Then I would need to modify FMX.Canvas.GDI.pas and FMX.Canvas.GPU.pas to make the same change. It's not a huge amount of work though. The interface for fill mode is already there. I wonder why they didn't implement such a basic feature?
  5. XylemFlow

    Draw a path with winding fill mode?

    TCanvas doesn't appear to provide a way to switch between 'alternate' and 'winding' fill modes. The default is alternate. This is important when paths intersect themselves and prevents me rendering certain objects how I would like. I created a new feature request for this on the quality page a while ago. It got the following comment. I'd like to try to do that as my application is currently Windows only. However, how do I actually go about calling implementation specific functions like Path.SetFillMode(D2D1_FILL_MODE_WINDING) in my code? I know how to find out the current implementation of a TCanvas with ACanvas.ClassName.
  6. XylemFlow

    Newbee: FMX: Can't find DirectoryListBox or FileListBox

    TListBox is there in FMX. I'm not sure why you think it's not. Regarding rotating images. You may know this already but the best way to do it is by setting the Matrix property of the TCanvas you're drawing to. Use TMatrix.CreateRotation to create the matrix from a rotation angle. The advantage of this method is that the GPU takes care of all the transformations. It's also easy to combine with other transformations such as scaling or translation. TBitmap.Rotate is essentially doing that for you, but gives you less control.
  7. XylemFlow

    is there a complete guide to converting VCL to FMX?

    I have done this myself. I don't know of a guide to doing it. I'd just recommend to familiarise yourself with FMX first. You will have to rebuild your forms from scratch. You can then copy and paste most of the code and link the events, but some changes will be needed. The drawing commands are different and you need to get used to wrapping drawing commands with BeginScene and EndScene. Code using strings may need to be modified because of unicode. Finally, some visual components are just different and have differently named properties (the most common is that you will have to change .Caption to .Text). Other than that it's not too bad and you get quicker once you get into it.
  8. XylemFlow

    Converting simple VCL form to FMX

    When I ported my application from VCL to FMX I remade each form by hand. There are 17 forms so it took a while, but this was not the most time consuming part of the porting process by far. The RAD interface makes it quick and easy.
  9. XylemFlow

    Can you mix VCL and FMX?

    Yes you can, but of course it will only compile under Windows. I have used several VCL features in my FMX application. I just place them inside {$IFDEF MSWINDOWS} so they don't compile under other platforms.
  10. XylemFlow

    Font Family selector component needed for FMX

    I've solved some of the issues with the font selector. The cursor now changes correctly. I'm quite happy with it now. The locking issue still happens but I discovered that this was not due to the number of fonts in the list but a particular font that is slow to render that I have installed (Surfing Capital). If I remove that font from the list then all is fine. I found that this font is also causing issues with the font selectors in other apps such as MS Paint, so it may not be worth doing anything about. FontSelector_v2.zip
  11. XylemFlow

    Font Family selector component needed for FMX

    I've made some progress on this, which you can see in the attached demo. I've made my own font selector which automatically collects installed fonts from Windows, has autocomplete when typing and shows each font in its own font for preview. However, there are a couple of issues that I could use some help with. There's quite a lot of lag sometimes when scrolling through the list using the scrollbar. It will often lock up and take several seconds to recover, during which time the CPU is fully occupied with something. I do have 528 fonts in the list, which is likely part of the issue, but similar font selectors in other apps, such as Inkscape don't have a similar issue. If I comment out the code for setting the font family of the list items (lines 109-111 of FontSelector.pas), then there's no such issue. I'd like the cursor to show crDefault when over the dropdown button instead of the text bar. I think this is due to the parent of the TButton being the TEdit. Any suggestions for solving these issues or other general improvements are welcome. FontSelector.zip
  12. This issue is now solved thanks to the support team at Embarcadero. The issue was happening for users who had an old version of Windows 10. The users who reported the error had not installed any Windows 10 updates in years! New DPI code added in Delphi 11 related to menu items was calling a Windows 10 function that did not exist in early versions of Windows 10 and so was causing the error. The fix was to modify line 297 of FMX.Helpers.Win.pas to the following. if (TOSVersion.Major >= 10) and (TOSVersion.Build >= 14393) then The issue has been reported so that it can be fixed permanently in future updates. Thanks for everyone's help. The extra debug info from the callstack made the difference.
  13. XylemFlow

    How can i add a custom font to a windows fmx application

    I have a custom font in my Windows app. I created the font as a .ttf file. It gets installed under Windows with the app using Inno Setup. It can then be used like any other font within the app. You can do something similar for other platforms.
  14. Another update on this issue. I have created a minimal application in D11 with just a TMainMenu linked to a TImageList. The main menu has a single item with an image. This still causes the error for the user, which confirms that the issue is related to main menu linked to an image list. Still no progress on working out how the user's computer is different from mine and most other users.
  15. Did you follow the tutorial exactly? If you provide the code then we'd be able to help a lot more.