FNC wishes the VCL Delphi community a merry Christmas!
Intro
FNC was born in 2016 and with it, a lot of great opportunities and ideas. We started with TMS FNC Chart, followed by TMS FNC UI Pack only 4 months later! The typical components such as a grid, treeview, planner and many more are included as you would expect in a UI component set. In April 2020, with TMS FNC Maps, we introduced a brand new way to add and work with mapping/routing services in your application. Today we have a wide variety of visual and non-visual components and libraries to enhance your application. The latest addition to the FNC family, named TMS FNC WX Pack, provides access to a whole new world of JavaScript/HTML based libraries and components to Delphi. All of this would not be possible without a solid foundation, a component structure that is reliable as well as extensible.
Solid Structure
The architecture needed to be solid, robust as well as extensible. Our initial idea was to create a base component for each product separately, but not long after, we abandoned the idea and immediately thought out of the box and created TMS FNC Core. TMS FNC Core was the foundation we created starting with a custom control class and some utility functions. Over the years TMS FNC Core grew into a versatile base foundation for creating cross-platform and cross-framework custom controls. This includes VCL, FMX, LCL and WEB frameworks. Today we focus on a showcasing TMS FNC Core for VCL.
Working on FNC components and the TMS FNC Core foundation on a daily basis and looking back at beginning made us realize that TMS FNC Core is much more than just a foundation. It’s actually capable of doing powerful things with little to no code. The following example demonstrates what TMS FNC Core alone is capable of. No need to install additional components, just download, install TMS FNC Core, plugin the code and experience the true power of FNC.
Merry Christmas
Out of all the features TMS FNC Core has to offer, we picked a couple of important ones: PDF export, SVG and asynchronous file download support. The code snippet below shows how to download an SVG, export it to PDF. Not more than 25 lines of code went into this sample, with a very nice and warm result, especially during this time of the year!
uses VCL.TMSFNCCloudBase, VCL.TMSFNCTypes, VCL.TMSFNCPDFLib, VCL.TMSFNCGraphicsTypes; procedure TChristmasForm.GenerateChristmasWishes; begin TTMSFNCCloudBase.DownloadFileFromURL('https://tmssoftware.com/site/img/merry%20christmas.svg', procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult) var b: TTMSFNCBitmap; p: TTMSFNCPDFLib; begin p := TTMSFNCPDFLib.Create; b := TTMSFNCBitmap.CreateFromStream(ARequestResult.ResultStream); try p.HeaderSize := 100; p.HeaderFont.Size := 24; p.HeaderFont.Style := [TFontStyle.fsBold]; p.HeaderFont.Name := 'Lucida Handwriting'; p.HeaderFont.Color := MakeGraphicsColor(156, 41, 41); p.Header := 'tmssoftware.com wishes you a'; p.Footer := ''; p.BeginDocument('Christmas.pdf'); p.NewPage; p.Graphics.DrawImage(b, p.MediaBox); p.EndDocument(True); finally b.Free; p.Free; end; end); end;
Download TMS FNC Core today, explore the capabilities!. Found something yourself that’s worth sharing? Please let us know, we are excited to find out what you have created, in which way you are using FNC. TMS and FNC wishes you all the best and a merry Christmas!