TMS Software. All-Access

TMS WEB Core for Visual Studio Code v1.2 released!

After we released TMS WEB Core v1.6 Pesaro for Delphi & Lazarus on earlier in January this year, we are pleased to inform that the release of TMS WEB Core for Visual Studio Code is now here as well. This brings the framework and language support on par with the versions for Delphi or Lazarus. Focus on new language features Among the major new capabilities of the pas2js compiler are: Generics Attributes Class constructors Resource strings Async procedure decorator Await support JavaScript promises support Resource file support So, the long awaited support for generics (that comes with the accompanying RTL unit generics.collection) and attribute support will allow that nearly all of your existing Delphi code can move over to TMS WEB Core for creating web applications. On the other side, the new support for async procedures, for promises and for await, will mean that you can use modern web paradigms for handling asynchronous functions easier. These features async, promise and await are direct equivalents to the existing JavaScript functionality and do not exist for native Delphi application development. Updating is easy Updating to the new TMS WEB Core for Visual Studio Code v1.2 is easy. Either you obtained TMS WEB Core for Visual Studio Code from the Microsoft marketplace and the IDE will handle the update automatically for you or you can download the latest version from our website. Either way, you will need to reactivate either your trial or full registered version credentials. What’s next? We have been working a long time on v1.2 but in parallel we have already made significant advances for the next release v1.3. The new version will bring component package support. So, from the IDE, you will be able to install additional component packages including creating your own custom component packages. When this is in place, your array of available components at design-time will rise significantly as our full range of TMS FNC Components will become readily available from TMS WEB Core for Visual Studio Code as well. For now, this use was limited to using the classes via runtime code. Get started now If you didn’t get your feet wet already with RAD component based Object Pascal based web client development, now is the time to enter this fast moving & fascinating world. The sheer amount of new possibilities and territories is staggering. You cannot only develop no-deployment cross platform rich web client applications, but also offline usable and installable PWA’s for use on mobile devices bypassing Apple or Google stores. Or you can use the Electron framework to create cross-platform desktop applications for Windows, macOS and Linux with a modern and fresh looking HTML/Web based GUI. And with Visual Studio Code, you can do all this directly from your favorite operating system: Windows, macOS or Linux. Learn here about the new generics support: Get the TMS WEB Core for Visual Studio Code v1.2 trial or use TMS WEB Core for Visual Studio Code v1.2 as part of the TMS ALL-ACCESS subscription, the no-nonsense subscription to our entire product portfolio coupled with priority technical support services.

Read More

Freebie Friday: capture controls or forms

New year, new ideas. So, I’m happy to kick off with one of the many new ideas we have, which is the Freebie Friday! Freebie Friday is simple. We share a useful code snippet that might be handy in your projects. We present it, you copy and paste it and you use it in your applications where you see use for it. Freebie Friday free source code snippets are the result of our daily work, writing components, offering support & consulting for customers … Over time, a huge collection of useful code builds up and instead of letting this collect dust, we cheer up your Friday, just before the weekend and present it here. This first freebie is two routines that enable you to capture a control as image. The first that might come up is, why write a routine for this, a control offers control.PaintTo() and we can just use that to have the control paint to a canvas and save that to a file. In theory yes, in practice, sadly this doesn’t work well with many controls. So, therefore these two routines that do work with any VCL control and as a bonus, it works with a VCL form as well, so you can capture entire forms to a bitmap or image. Here we go, here is the code: interface uses Classes, Windows, Messages, Graphics, JPEG, Controls, Types, Forms; procedure CaptureControl(AControl: TControl; ABitmap: TBitmap); procedure CaptureControlToJpeg(AControl: TControl; AFileName: string; AQuality: integer = 70); implementation uses Winapi.DwmApi, SysUtils; procedure CaptureControl(AControl: TControl; ABitmap: TBitmap); var LDesktopDC: HDC; LRect: TRect; LDWMRect: TRect; LPt: TPoint; begin LPt := AControl.ClientToScreen(Point(0,0)); LRect := Rect(LPt.X, LPt.Y, LPt.X + AControl.Width, LPt.Y + AControl.Height); if (AControl is TWinControl) and (AControl as TWinControl).HandleAllocated then begin GetWindowRect((AControl as TWinControl).Handle, LRect); end; if (AControl is TCustomForm) and (AControl as TCustomForm).HandleAllocated then begin GetWindowRect((AControl as TCustomForm).Handle, LRect); if (Win32MajorVersion >= 6) and DwmCompositionEnabled then begin if (DwmGetWindowAttribute((AControl as TCustomForm).Handle, DWMWA_EXTENDED_FRAME_BOUNDS, @LDWMRect, SizeOf(LDWMRect)) = S_OK) then begin LRect := LDWMRect; end; end; end; LDesktopDC := GetWindowDC(GetDesktopWindow); try ABitmap.PixelFormat := pf24bit; ABitmap.Height := LRect.Bottom – LRect.Top; ABitmap.Width := LRect.Right – LRect.Left; BitBlt(ABitmap.Canvas.Handle, 0, 0, ABitmap.Width, ABitmap.Height, LDesktopDC, LRect.Left, LRect.Top, SRCCOPY); finally ReleaseDC(GetDesktopWindow, LDesktopDC); end; end; procedure CaptureControlToJpeg(AControl: TControl; AFileName: string; AQuality: integer = 70); var LJpeg: TJpegImage; LBmp: TBitmap; begin LBmp := TBitmap.Create; try CaptureControl(AControl, LBmp); LJpeg := TJpegImage.Create; try LJpeg.Assign(LBmp); LJpeg.CompressionQuality := AQuality; LJpeg.SaveToFile(AFileName); finally LJpeg.Free; end; finally LBmp.Free; end; end; To use these routines, you can do this with: begin // capture a control to JPEG file setting JPEG quality to 90 CaptureControlToJpeg(mycontrol, ‘mycontrol.jpg’, 90); // capture a form (Self) to JPEG file setting JPEG quality to 50 CaptureControlToJpeg(Self, ‘myform.jpg’, 50); end; To capture a control to bitmap, use: var LBmp: TBitmap; begin LBmp := TBitmap.Create; try CaptureControl(mycontrol, LBmp); // do what you want with the bitmap here finally LBmp.Free; end; end; Enjoy and have a good weekend!

Read More

Webinar: Develop Web Clients from the Delphi IDE

We look forward to connect with you at the upcoming webinar! Learn about the new features in the latest release v1.6 Pesaro in the upcoming webinar organized by Barnsten. Webinar: Develop Web Clients from the Delphi IDE TMS WEB Core is based on compiling Delphi UI code to JavaScript and creating this way what that Delphi developers are used to. A TMS WEB Core application can contain multiple forms. These multiple forms will be hosted in a JavaScript application a web browser user can navigate to via a single page URL. Any modern HTML5 compliant browser can run TMS WEB Core web client applications. This includes Chrome, Safari, Edge, Firefox, Firefox Developer Edition, Opera. Our CTO Bruno Fierens will take a tour around TMS WEB Core and the exciting new capabilities v1.6 brings and how to use this in a productive way to develop web client applications. Register now for the webinar to ensure your seat. This will be an interactive webinar. You can ask your questions during or after the webinar. Is a FREE online event, organized by Barnsten Netherlands, on Janaury 26th, 2021. Learn more Visit barnsten.com, register and participate.

Read More

TMS FNC Cloud Pack v1.3 released!

Intro 2021 is just started and with only a few weeks into the new year we are proud to present you the TMS FNC Cloud Pack 1.3 update which brings a new set of services, big improvements to existing services as well as a new design time authentication dialog and last but not least: service wrappers. Below is an overview of what you can expect when installing the TMS FNC Cloud Pack 1.3 update. New services When installing the update you get access to the following new services: Service wrappers The update also brings 3 new service wrapper components: TTMSFNCCloudLogger: wrapper around cloud logging services: Sentry, Exceptionless and Rollbar TTMSFNCCloudStorageServices: wrapper around all cloud storage services TTMSFNCCloudTranslation: wrapper around translation services: Microsoft Translator, Google Translate and IBM Watson Translator Improvements Improvements are made in various areas: Response headers accessible in TTMSFNCCloudBaseRequestResult Download attachments in Microsoft Outlook Mail & Google GMail Dropbox upgraded to version v2 Google Drive upgraded to version v3 MoveFile and MoveFileToRoot for all cloud storage services Designtime helper After installing update 1.3 you’ll notice the Authentication property has an option to popup an authentication helper dialog. This dialog will allow you to fill in your client-id, secret and/or API key (depending on the service), authenticate and save the result on your machine. This depends on the PersistTokens settings. When opening the form again, the settings can be restored by opening the authentication dialog again and clicking authenticate button. Additionally, when you are unsure on how to obtain a client-id, secret or API key, there are 2 buttons that will help you with that. The “Help” button will take you to this page, which is a general overview for all supported services and step-by-step instructions on how to register your application and obtain the necessary information for authentication, and a “Create Client ID/API Key” button that will immediately take you to the page where you can (after successful login) generate a Client ID and/or API key. Demos This update also brings 3 new demos, demonstrating the wrapper capabilities for the storage, logger and translation services. Stay tuned for the next release which will add more demos and add more services as well as improve existing ones.

Read More

TMS VCL UI Pack v10.5 released

The New Year 2021 is still fresh and there is already a major update for TMS VCL UI Pack. As always, our updates focus on bringing the latest improvements and adding features to make your VCL Windows desktop applications built with Delphi & C++Builder shine. In this new version v10.5 we bring several new UI features: Emoji support in HTML engine For some time now, support for the use of emoticons is built-in standard in the Windows operating system. In the Windows operating system this is handled via a multi-color Truetype font Segoe UI Emoji. Regular Windows GDI API based controls (which most standard VCL controls are) cannot use multi-color Truetype fonts. To take advantage of this, for native applications, at minimum the Direct2D API needs to be used. We did the work for you, our HTML engine was updated with the capability to render multi-color Truetype fonts and with this the ability to render emoticons specified via HTML. The HTML standard prescribes a whole range of values for the various emoticons that exist. You can check the list here. In a nutshell, if you write in HTML 😜 I will display 😜 it will render as: 😜 I will display 😜 So, now you can add Emoji decimal values in your HTML used for our VCL components that can render it. This includes labels, listbox, combobox, grid, navigation controls, panels and so much more. New TAdvEmoticonPickerDropDown Offering an easy to use UI with which you can select such emoticon. The TAdvEmoticonPickerDropDown can directly return the HTML code for the selected emoticon via AdvEmoticonPickerDropDown.EmoticonHTML: string property. This new TAdvEmoticonPickerDropDown is used in the design-time HTML string property editor for controls that are enabled with HTML rendering. New web-style form input control validation In web forms, we are used to validation with clear indication on input controls where a value was not entered or was entered incorrect. In VCL Windows desktop applications, this is less common but it can add value to the user experience. While it is possible to do this all manually with showing extra labels with info on why an input entry is incorrect, we have created an easy to use concept for displaying validation feedback to users. This consists on one side of a centralized component (or multiple components) that hold the settings for the validation tooltip and in the TMS input controls like TAdvEdit, TAdvComboBox, TAdvSpinEdit, TAdvDateTimePicker, … and all their descendent classes there is the method control.ShowValidation() / control.HideValidation() added to easily show and hide a certain validation text. For standard VCL controls or other 3rd party controls, the generic method ShowValidator(Control, Text, ValidatorSettings) or HideValidator(Control) are provided. Combining this, you can easily create validation screens like in this example: Input control balloon hints Another helper for guiding users to make correct form entries, is via a balloon hint. We have also extended our input controls like TAdvEdit, TAdvComboBox, TAdvSpinEdit, TAdvEditBtn, … and their descendent classes with ShowBalloon() / HideBalloon() methods. With these methods you can give clues to users when he is not entering correct values as the user leaves the control or while typing. It offers 4 types : neutral, information, error or warning types. Get started TMS VCL UI Pack v10.5 is a free update for all active TMS VCL UI Pack, […]

Read More

TMS WEB Core v1.6 tips & tricks

We are pleased to share two more tips for using TMS WEB Core v1.6 Pesaro. The first tip is for how you could implement on the fly filtering on a TWebResponsiveGrid. The second tips concerns the dynamic creation and use of a TFrame. Let’s dive into the first tip right-away with showing filtering for the TWebResponsiveGrid. Filtering in a responsive grid TWebResponsiveGrid is a grid UI control that is responsive. This means that the number of columns will depend on the available window width in the browser. In this sample, we configured the TWebResponsiveGrid that about 200 pixels width is needed for a grid item and that the number of columns as such, will depend on how many items of width 200px fit in the browser window width. Each item of the TWebResponsiveGrid consists of a small snippet of HTML filled with data from a JSON HTTP GET request response. This JSON contains an array of JSON objects with information about cars. One such item is for example: { “Brand”: “BMW”, “Model”: “Z8”, “Hp”: 400, “Max speed”: 250, “City”: “Munchen”, “Country”: “Germany”, “Type”: “cabrio”, “Picture”: “bmw1.jpg”, “Year”: 2000, “Price”: 95000, “Cylinders”: 8 } The HTML template for the item is set to: ‘(%Brand%) (%Model%)(%Country%) Year:(%Year%)Price:(%Price%)€’; As you can see, it will fetch Brand, Model, Country, Year, Picture and Price from the JSON. When the JSON is loaded, all car items become visible in the responsive grid. Now comes the code to filter which car items will be visible. We will let the filter apply in this case on the car brand and car model. That means that when a value typed in the filter matches either brand or model, the item will be displayed. The code to perform this filtering becomes: var i: integer; f,s,a: string; begin if edFilter.Text = ” then begin for I := 0 to carlist.Items.Count – 1 do carlist.Items[i].Visible := true; end else begin f := Uppercase(edFilter.Text); for i := 0 to carlist.Items.Count – 1 do begin s := carlist.Items[i].JSONElementValue[‘Brand’]; a := carlist.Items[i].JSONElementValue[‘Model’]; s := Uppercase(s); a := Uppercase(a); carlist.Items[i].Visible := (pos(f, s) > 0) or (pos(f, a) > 0); end; end; end; As you can see, we extract the car brand and model via the JSON object attached to the item and when there is a match, the item is visible otherwise not. When the filter changes, we first set all items as visible again, ensuring that any previous filtering operation is undone. That’s it. There is nothing more to it. The display work is all handled automatically by the TWebResponsiveGrid. Dynamically creating, using and destroying a frame In TMS WEB Core, you can use a TFrame just like you can in a Delphi VCL Windows application. You add your UI controls + UI control logic to the frame and you can use this frame on other forms in the VCL application. In TMS WEB Core, the concept is exactly the same. Here we created a frame with a common UI pattern: two listbox where items can be moved from left listbox to right listbox and vice versa. This UI and its code is added to a frame. Now, to use this frame, we just need to add the unit of the frame to the uses list and the following code will from a single […]

Read More

TMS WEB Core v1.6 released

We’re thrilled to bring the quantum leap the pas2js v2.0 compiler brings to TMS WEB Core with the release of TMS WEB Core v1.6 Pesaro today. The new compiler has been in development for quite some time and brings the experience for Object Pascal developers to create web client applications from the Delphi or Lazarus IDE to a new level. Among the major new capabilities of the pas2js compiler are: Generics Attributes Class constructors Resource strings Async procedure decorator Await support JavaScript promises support Resource file support In a nutshell, this ensures you can bring your modern Object Pascal code to the web as well as take advantage directly from Object Pascal code from modern typical web paradigms such as await & promises for handling asynchronous code. All active registered users for TMS WEB Core can obtain the update after login on our website under “My Products”. Just as our team internally can now start taking advantage of the new compiler features to write new & enhanced framework code, you can apply this to your application level code. The new compiler features will also enable more of other TMS products that were already using generics and attributes for example to become a possible target for porting this to TMS WEB Core. TMS FNC Products ready for the new TMS WEB Core Note also that our entire TMS FNC components portfolio has already been prepared for compatibility with TMS WEB Core v1.6. The amazing array of cross-framework, cross-platform components from TMS FNC UI Pack, TMS FNC Chart, TMS FNC Cloud Pack, TMS FNC Maps, TMS FNC Blox, TMS FNC Dashboard Pack is ready for use in your web client applications now. Coming soon to Visual Studio Code As the same compiler and exactly the same framework code is used in TMS WEB Core for Visual Studio Code, you can expect shortly the release of TMS WEB Core for Visual Studio Code v1.2 that will bring all these enhancements to the Visual Studio Code IDE running directly on Windows, macOS or Linux. It doesn’t end here, it just continues With the new TMS WEB Core release, the path is now also open to start introducing new functionality and features at framework level. Our team has been very busy in parallel to develop new extensions to the framework, so, be assured that TMS WEB Core v1.7 is already in the pipeline. More about what is cooking in the labs for v1.7 will be detailed in the coming weeks. Get started now If you didn’t get your feet wet already with RAD component based Object Pascal based web client development, now is the time to enter this fast moving & fascinating world. The sheer amount of new possibilities and territories is staggering. You cannot only develop no-deployment cross platform rich web client applications, but also offline usable and installable PWA’s for use on mobile devices bypassing Apple or Google stores. Or you can use the Electron framework to create cross-platform desktop applications for Windows, macOS and Linux with a modern and fresh looking HTML/Web based GUI. And know that we have even more and exciting alternative targets for TMS WEB Core web client applications in the making! Learn here about the new generics support: Get the TMS WEB Core v1.6 trial or use TMS […]

Read More

WYSIWYG rich text editing in FMX

Intro The multi-device, true native app platform The FireMonkey® framework is the app development and runtime platform behind RAD Studio, Delphi and C++Builder. FireMonkey is designed for teams building multi-device, true native apps for Windows, OS X, Android and iOS, and getting them to app stores and enterprises fast. source: https://www.embarcadero.com/products/rad-studio/fm-application-platform FMX (FireMonkey) released in 2011 and shortly after we delivered a first set of components. Today, we want to show you the TTMSFNCRichEditor component, a light-weight WYSIWYG editor for formatted text. Features Below is a list of the most important features the TTMSFNCRichEditor has to offer. The features are not limited to this list, but this will give you a quick insight on what we offer to be able to edit and format rich text content in FireMonkey. Formatted text with bullets, hyperlinks, images, indenting and aligned paragraphs Functions for merging, highlighting text, undo/redo and clipboard operations Horizontal ruler support Stores its text natively in the .RTE file format Possibilities to load from .TXT, .RTF, .HTML and .RTE Export to .PDF, .TXT, .RTF, .HTML and .RTE Separate rich editing/formatting toolbars Emoticons support Support for BitmapContainer images Autocorrect: custom auto-correct actions Interface to TMS Spell Check engine Learn More! Want to learn more about what the TTMSFNCRichEditor can do? Here is a video that highlights some of the above features through a demo application. Download & Explore! The TTMSFNCRichEditor component is part of the TMS FNC UI Pack, which, on top of FMX, also offers the ability to write your code once and target other frameworks (VCL, LCL and WEB). You can download a full featured trial version of the TMS FNC UI Pack and start exploring the capabilities of the TTMSFNCRichEditor component. Coming up The TTMSFNCRichEditor is the first of a series of components that is covered to empower your FMX (FireMonkey) developments. We started the series with a general overview of the most important components that we have to offer. Next up will be the TTMSFNCPlanner component, a highly configurable planner / scheduler component for FMX (FireMonkey), so stay tuned for more!.

Read More

Show a PDF from a TMS WEB Core app

This is a frequently asked question from TMS WEB Core users how a PDF file, typically a generated report, can be shown from a TMS WEB Core app. The good news is that it is simple as browser technology has us covered. There are basically two options: Show the PDF file in a new browser window (tab) Show the PDF embedded in the application window So, let’s just do this and provide a project that shows this. To show the PDF file in a new browser window, all we need to do is call Application.Navigate(URL, ntBlank), where URL is the link to the PDF file. To show the PDF file embedded in the application window, we can drop a TWebBrowserControl on the form and set its URL to the link to the PDF file. So, in a nutshell, the code behind becomes as simple as: procedure TForm2.WebButton1Click(Sender: TObject); const URL = ‘https://download.tmssoftware.com/download/manuals/TMS%20Async.pdf’; begin if WebRadioButton1.Checked then WebBrowserControl1.URL := URL else Application.Navigate(URL, TNavigationTarget.ntBlank); end; For your convenience, you can download the test project here Needless to say that this exact code works in TMS WEB Core for Delphi, TMS WEB Core for Lazarus and TMS WEB Core for Visual Studio Code. It can be applied in a classic web client application, a PWA and also an Electron based cross-platform desktop application. Not using TMS WEB Core yet? Get your free & fully functional trial version download from our website and benefit from the Holiday Season holidays to explore and get excited.

Read More

This was 2020 at TMS

There is a lot to say about this year 2020 and for sure, we at TMS had our challenges as well. But to end the year and look back at it, we prefer to stick to the positive things that happened this year. New products Looking back, it is actually amazing how many product releases we did and what significant new products were introduced. I think like most software developers, you can relate to the feeling how sometimes painfully slow and difficult software development can be. But in hindsight, we can look back at fantastic achievements. It is with this feeling I’m looking back at our year 2020 especially about two new products that were released: TMS FNC Maps We took our FNC concept on steroids with this new product. TMS FNC Maps is not only supporting 4 different development frameworks, 5 operating systems, all major browsers but also 8 different mapping services. Take the best mapping features at the best prices and combine these to integrate powerful mapping functionality in your VCL, FMX, LCL and TMS WEB Core web applications. TMS WEB Core for Visual Studio Code Another tour de force was bringing our TMS WEB Core framework to Visual Studio Code. Visual Studio Code is like a natural fit for TMS WEB Core. It is the beloved IDE for web developers, it runs on Windows, macOS and Linux, it is built with web technology, it has a large ecosystem and it is free. It foremostly enables to render your pages and its controls live in the designer, even taking responsive design in account. We even released already a major update in 2020 with support for PWA and Electron cross-platform desktop application development support. Upcoming is the release of v1.2 with support for pas2js v2.0 compiler that introduces generics, attributes, await, promises and many more new capabilities. Product updates Many products got constant updates mainly driven by your feedback, needs, requests. There are too many updates in 2020 to cover all in detail but I’d like to highlight a few ones that personally excited me. TMS Flexcel TMS Flexcel for VCL/FMX and TMS Flexcel for .NET got frequent updates this year. The major new features that were added are support for .NET Core v5.0 and an API for adding charts to .XLSX files. TMS VCL UI Pack Formerly known as TMS Component Pack, TMS VCL UI Pack has an almost bi-weekly update scheme. Countless new features and enhancements were added all the time. But for me, the major one is the introduction of the new TAdvWebBrowser component that is a wrapper for the new Windows Edge Chromium browser. TAdvWebBrowser permits modern and secure integration of web functionality in your VCL applications. Further, we focused a lot on polishing VCL styles support, TMS styles support and multi-monitor high-DPI support. TMS FNC UI Pack Be it for cross-platform FireMonkey applications, VCL Windows applications, TMS WEB Core web applications or free Lazarus IDE based cross-platform applications, TMS FNC UI Pack is a bundle of UI controls including grid, planner, rich editor, treeview, object inspector, … and much more. Several new components were added to this pack this year: TTMSFNCWaitingIndicator, TTMSFNCSplitter, TTMSFNCRating, TTMSFNCRichEditorHorizontalRuler, TTMSFNCProgressBar and also here our cross-framework, cross-platform browser component was updated to Edge Chromium on the Windows platform. We also […]

Read More