VCL

Human Interface Devices Communicator For C++ Builder On Windows

Communicating with Human Interface Devices Communicator such as Alphanumeric display, Bar Code Reader, Sensors, Volume control on Speakers/Headsets becomes a primary use case for real-world applications. Do you spend more time in building libraries to communicate with HID for your Delphi/C++ and Lazarus Applications? WINSOFT Provides a powerful library to get the job done. It uses the standard Windows HID API. Features: Able to notify on Human Interface Devices Communicator arrival and removal. Can retrieve all the HID devices information available in the System. Flexible to getting/set Feature Report for the HID devices. Works with Windows 32/64-bit applications. Versions Supported: from C++ Builder 5 to 10.4 Sydney and Lazarus 2.0.8. Platforms: Windows;   Steps to Download and use the Native HID Library: Download Native HID and Unzip the file. Navigate to the Library folder for different Versions. e.g) Delphi10.4. Read the Readme.txt file to know about features and copyright information. Create a Windows VCL Application and use Hid.pas in the uses section. Include the Library folder into Project->Options->Delphi Compiler->Search Path. Compile and check for using the library. Key HID concepts:Report -Reports are the actual data that is exchanged between a device and a software client.  Input Report – Data sent from the HID device to the application, typically when the state of a control changes. Output Report – Data sent from the application to the HID device, for example to the LEDs on a keyboard. Feature Report -Data that can be manually read and/or written, and are typically related to configuration information. Report Descriptor – The Report Descriptor describes the format and meaning of the data that the device supports.UsageTables – Contain a list with descriptions of Usages, which describe the intended meaning and use of a particular item described in the Report Descriptor. For example, a Usage is defined for the left button of a mouse.  USB-IF WorkGroup Publishes the Usage Tables. See USB-IF HID Specifications.

Read More

Easily DirectX Support with VCL In C++Builder On Windows

It is surprisingly easy to add joystick support to your VCL In C++Builder app on Windows. Here is third party Delphi and C++ Builder component from WINSOFT for retrieving joystick position and status for any keys. You can use wired or wireless joystick for your application like games, audio/video players and other application. I have tested this delphi component on a recent Windows 10. All functionality corresponds to the declared. All buttons my joystick successful detected. Also works analog sticks. Now let’s view this demo (included to instalation packages) The first thing you need to do is install component to Delphi. It’s very fast and simple! Look this video. Demo included to component package. Now let’s look at the stages of working with a component. # 1 stage – Enumerate controlers # 2 stage – Connect to controler and get value ranges # 3 stage – Now we can read current values from controller anytime. The component uses the DirectX API. Extended capabilities also provide support for rudder pedals, flight yokes, and other devices that use up to six axes of movement, a point-of-view hat, and 32 buttons.This component has both versions for FireMonkey and for VCL In C++Builder applications to Delphi / C ++ Builder 10 – 10.4. Works with: Delphi, C ++ Builder, RAD Server, FireMonkey, VCLWorks on: Windows 32-bit, Windows 64-bit Source code included in registered version. Royalty free distribution with application without any limitation. Related linksHere is packages for VCL and Firemonkey:JoystickJoystick for FireMonkeyDirectX JoystickDirectX Joystick for FireMonkey Code Faster and Smarter with VCL on C++Builder Smart developers and Agile software teams write better code faster using modern OOP practices and C++Builder’s robust frameworks and feature-rich IDE. Spend less time waiting for lengthy compiles with our highly optimized modern C++ compilers for Windows and iOS Code Insight™ delivers code-completion based on your code and used libraries to help you code quickly and accurately plus customize the IDE to meet your coding style. Get native, high-speed direct access to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, MongoDB, and more. Get hints and tips from inline documentation as you write code Utilize popular libraries such as Boost, Eigen, and ZeroMQ plus leverage a broad range of community tools and libraries. Integrate with version control systems including Git, Subversion and Mercurial

Read More

New for the IDE in RAD Studio 10.4.1

RAD Studio 10.4.1 is a quality-focused release, and this goes for the IDE! We’ve addressed many items including some very commonly requested changes; read more below. A ‘quality-focused release’ means one where we introduce very few new features, and focus 95% of our development efforts on quality. 10.4.1 has had a lot of work in the IDE and will be much smoother for you once you install. But, in 10.4.1 we’ve also spent that time on new features, and we’ve implemented a couple of really commonly requested items. There are two sections to this blog post: first, a change to an old IDE feature; second, a new feature, and key areas that you may be very happy we’ve focused on! The Floating Form Designer Layouts and Multiple Monitors: aka, ‘when does the IDE change things?’ Notable Quality The Floating Form Designer Ever since 2003, the RAD Studio IDE has been ‘docked’: that is, while you can drag tool windows like the Palette, Object Inspector, Messages, Watches and so forth to float, the overall design of the IDE is an integrated window. Specifically the editor and form designer are integrated in the main window. The ‘floating form designer’ is when you turn this off, and it allows the form you are designing to be a window among other windows; that is, it’s not embedded in the main IDE, but mimics the Delphi 1-though-7 behaviour where the designed form can be above or behind the editor. This behaviour has been replaced by modern docked designing for seventeen years, requiring you to manually turn on the old-style feature, and unfortunately did not always behave well. When assessing the feature, we made the hard decision to remove it. What does this mean? Does it mean you can’t have multiple editor or designer windows, for example? No! Very much not. In fact, you can still have multiple editor windows spread over multiple monitors too if you wish, with each one hosting a designed form… and we’ve even tweaked a wide range of areas and UX or behaviour tweaks while you do! Two really notable items we’ve addressed in this area are: The IDE used to not work quite as you’d want when clicking on an item in the Structure pane: the Structure pane would sometimes scroll and the wrong item was selected. This is now resolved. If you click, it will select what you clicked on. I’m really glad to note this one. When you have multiple forms being designed at once, the Structure and Object Inspector windows would reflect the selection for the form designer in the window they were docked to. Now they always reflect the form you are editing. Ie, whatever you’re working on is what they’ll show information for, regardless of what’s docked where. The key to note here is how much better 10.4.1 is at handling form designing over multiple screens. These were ‘annoyances’, things that might seem minor but got in the way when working. We’re glad to note the better behaviour in RAD Studio 10.4.1. Layouts and Multiple Monitors: aka, ‘when does the IDE change things?’ When working with layouts and the designer, we also added one often-requested feature. Desktop layouts save the position and location of your IDE windows, including the monitor your IDE is on. You can create […]

Read More

Ultra-Fast Web Application Development using Delphi/C++ Builder

Choosing the Web framework for Web Application Development in Delphi or C++ Builder will no more a tough task for both developers and companies to meet the business needs. There is plenty of resources around Embercadero and the web about various frameworks with the pros and cons of each. Still, struggle to choose the right one for your need? Don’t worry this post will guide you through the available frameworks. RADStudio Included Server Technologies : Web Broker: Abstract the HTTP Server concept with concrete classes mapped to CGI, ISAPI, ApacheModules, Standalone(indy). It can maps URLs to actions, supports filters, and global handlers. To start with WebBroker Click here. DataSnap is a Delphi technology that allows the development of multi-tier applications, most notably multi-tier database applications. Supports Rest, TCP/IP, HTTP/HTTPS. Backward compatible with COM/DCOM. A serios of tutorials here. RAD Server Load Delphi and C++ business logic methods into RAD Server, add some users, and go. REST/JSON end-points are auto-created and managed. Access control is handled. Data storage is built-in or you can easily connect to any popular Enterprise RDBMS or cloud service.  SOAP Services: It’s a protocol which enables you to access remote data, or call remote procedures. SOAP data is transmitted using an XML wrapper, usually over an HTTP or direct TCP/IP. To create and use SOAP service Click here. RADStudio Included some Client Technologies for Web Application Development: Which includes Rest BaaS Client, Cloud Client libraries, Rest Client libraries, SOAP Clients. 3rd Party Web Frameworks: Client Focused: Pascal->JavaScript Transpilers. Write in Object Pascal and translate/Compiles in to JavaScript. Creates a pure Web client Solution. Compatible with many popular server solutions. TMSSoftware’s Web Core Integrates into Delphi IDE. Write object pascal and design in RAD Studio, builds pure HTML & JavaScript. Works with TMS’s cross-platform FNC components. Builds a Single Page Application. The large reusable component set with database access. Smart Mobile Studio (SMSC) transpiler has its own IDE uses familiar Object Pascal dialect. Compiles to pure JavaScript. Has lots of target like Node.js Tizen, console & Espruino. Has own RTL and full Visual component framework. ElevateSoft’s Web builder transpiler has its own IDE with components similar to VCL. Supports using native Elevate Web Builder Web server Modules. It compiles to optimized JavaScript. Full Stack or Client/Server Focused: Framework covers the Server app and client interface. Balanced Approach good to choose when Both Server and Visually designed UI is one project. WebBroker is the core on the server for most frameworks listed below. AtoZed Software’s IntraWeb: Installs into IDE, Modeled on VCL, Visual Client Designer. The client built from the JS and HTML library. Delphi UI event handlers run on servers, extensible via typescript. FMSoft UniGui: Installs into Delphi IDE, VCL like design and use. Provides data-aware controls, supports desktop and mobile. Allows optional javascript for client-side events and VCL like server event handlers. Open source Ethea Kitto2: Uses Web broker for the backend. No visual designer, make it easy to use Ext JS to build client. Server Focused Open Source: Delphi MVC Framework: Rest Server built on WebBroker includes Delphi IDE wizard. Runs under Apche or ISS on Windows & Linux. Restful RMM level 3 compliant. Synopse mORMot : Doesn’t use Web broker, Integrated SpiderMonkey JavaScript engine for server-side business logic. ORM/ODM: Object persistence on Almost any database (SQL or NoSQL).SOA: organize your business logic into REST services. Web MVC: Publish your ORM/SOA process as responsive Web applications. MArs Curiosity: Lightweight Rest Server built on WebBroker, installs into Delphi […]

Read More

The power of AI from Delphi and/or C++Builder

On the record of the webinar on “Using IBM Watson and the power of Artificial Intelligence (AI) from Delphi and/or C++Builder ” from Thursday, October 24, You can see the resources, slides, and code examples used in the webinar: Resources How to create a free IBM Cloud account:  https://ibm.biz/BdjLxy​ IBM Watson Tone Analyzer:  https://www.ibm.com/watson/services/tone-analyzer/​ IBM Watson Visual Recognition:  https://www.ibm.com/watson/services/visual-recognition/​ Delphi-JsonToDelphiClass by Petar Georgiev:  https://github.com/PKGeorgiev/Delphi-JsonToDelphiClass​ TNetHTTPClient:  http://docwiki.embarcadero.com/Libraries/Rio/en/System.Net.HttpClientComponent.TNetHTTPClient​ Al Mannarino Blog Posts:  https://community.idera.com/developer-tools/b/blog Slides IBMWatsonAI_Delphi_CBuilder.pdf Code Samples: Delphi:WatsonVisual.dproj IBMWatsonToneAnalyzer.dproj (WatsonToneAnalyzer.zip) NetHTTPClient.dproj (TNetHTTPClient.zip)  C++ Builder:   CppSystemNetHttpClient.cbproj On this webinar we showed: – How to leverage the power of machine learning from Delphi and/or C++Builder with the IBM Watson Artificial Intelligence (AI) Services.– This webinar covered using the IBM Watson REST API. IBM Watson is a collaborative environment with artificial Intelligence (AI) tools that you can use to collect and prepare training data, and to design, train, and deploy machine learning models.– On this webinar we specifically looked at two of the IBM Watson AI Services:– The Visual Recognition Service, and the– Tone Analysis Service (for Natural Language Classification), plus we will also look at– Watson Machine Learning.But before we dove into using Delphi and/or C++ Builder with the IBM Watson Artificial Intelligence (AI) REST Services, we took a quick refresher look at what’s possible with Delphi and/or C++ Builder for the integration with Web and/or REST Services. We had a quick review on how to integrate Delphi and/or C++ Builder with back-end services to provide access to data and enhance the Delphi and/or C++ Builder VCL and Multi-Device user experience!

Read More

C++17 On Windows 10 With The C++ Builder

As you know from C++ Builder 10.3, we have support for the modern C++17 On Windows 10 version. Here you can see the C++ 17 support chart. In this CodeRage session, Dion Mai shows demo applications in action. You can find out how you can use the new C++17 On Windows 10 functions and an updated C++17 standard library.  What you can find in this session? Moreover, you can find out how you can call WinRT functionalities. You can find all the wrappers from the RAD Studio installation folder. Source->RTL->Win->WinRT   C++ Builder provides three levels of development:1. Components (VCL and FMX)2. Common Libraries (RTL).3. Platform APIs (iOS, Android, Mac OS) In this post we will discuss the Common Libraries (RTL). C++ Builder has several hundred functions, macros, and classes that you call from within your C and C++ programs to perform a wide variety of tasks, including low- and high-level I/O, string and file manipulation, memory allocation, process control, data conversion, mathematical calculations, and more.​ The C++ Builder Run-Time Library (or RTL) is composed of a number of base header files that provide the underlying support for most of the VCL and FireMonkey component libraries . The RTL includes global routines, utility classes such as those that represent streams and lists, and classes such as TObject, TPersistent, and TComponent.​ Although closely allied with FireMonkey and VCL, the RTL does not include any of the components that appear on the Tool Palette. ​ Instead, the classes and routines in the RTL are used by the components that do appear on the Tool Palette, and are available for you to use in application code in either VCL projects or FireMonkey projects, or when you are writing your own classes.​ For example, the System header contains most of the Run-Time Library (RTL). ​ And from the System header, you have the System.Math.hpp header that defines classes, routines, types, variables, and constants related to mathematical operations, vectors and matrices.​ Or the System.Bluetooth.hpp header that provides classes to use the Bluetooth capabilities of the device that is running your application to connect to applications running on remote devices.​ Or the System.Sensors.hpp header that provides classes and components that let you obtain information and manage system sensors. The Sensors are pieces of hardware or software that can provide measures of physical quantities to your applications.​ Or the System.Threading.hpp header that defines classes and types that implement the parallel programming library.​

Read More

TMS WEB Core for Visual Studio Code

TMS WEB Core for Visual Studio Code beta is ready for TMS ALL-ACCESS users. On July 26, 2018, we released the first version of TMS WEB Core for the Delphi IDE, hereby offering a RADically new way for creating web applications directly from the Delphi IDE. RADically different because TMS WEB Core offers RAD component based rich web client application development thanks to the technology of compiling the Object Pascal code to JavaScript with the pas2js compiler. The next step was to also enable using TMS WEB Core from the Lazarus IDE with the first version introduced in October 2018. At the same time, TMS WEB Core was extended with support for creating PWA’s, which is progressive web applications, meaning web applications that can be installed on mobile devices or Chrome desktop browsers, run offline, and access several parts of the device hardware. In a later step, February 2019, we announced support for creating cross-platform desktop applications via the Electron framework. On November 15, 2019, we unveiled that TMS WEB Core was also coming to Visual Studio Code. And now, today, after a huge amount of intensive work, we feel confident to give our baby in the hands of TMS ALL-ACCESS users. It took more time than expected to reach this level as the challenges turned out to be quite complex. Challenges we couldn’t have coped without having the absolute best engineers on board. In the first place, José Leon Serna, the architect of the IDE integration into Visual Studio Code, Roman Kassebaum overlooking and ensuring the Visual Studio Code integration works on 3 operating systems and remains compatible with Delphi’s project management, the pas2js compiler team assisting with debugging integration, the framework team itself taking up the huge task for making the UI controls all design-time editable. Let’s go back to the WHY of taking up this huge & challenging task. Before embarking on this project, José Leon Serna, former Embarcadero IDE architect and head of the engineering team in Spain, and myself mutually shared the vision that Visual Studio Code offered a couple of unique technical features that could potentially make it an ideal candidate for using it for TMS WEB Core web client development. Visual Studio Code is based on web technology. Visual Studio Code is an Electron application and internally, everything is rendered via web views. This makes it ideal to offer design-time live rendering of the forms designed by TMS WEB Core. This is the primary driver. But there are nice additional benefits coming with Visual Studio Code. So, in a nutshell, key decision factors for our endeavour were: Based on web technology, offers a live web rendered designer form Is cross-platform, Visual Studio Code can be used on Windows, macOS, Linux Designed to be extended via plugins with seamless plugin ‘marketplace’ distribution A powerful established Pascal code editing plugin OmniPascal is already available It is a high-DPI compliant IDE Features built-in mechanisms for debugging of applications running in a browser It features side-by-side editing, multi-view code editor windows that can be freely arranged It has a very low barrier of entry, as Visual Studio Code itself is free and open-source Just like our support for Lazarus adds freedom of choice, the capability to use Visual Studio Code now is extra freedom of choice. Of course, this won’t stop nor influence our plans for TMS WEB Core for Delphi. Version 1.4 of TMS WEB Core […]

Read More

Nou în RAD Studio 10.4 VCL Per-Control Styles

In the past, the VCL library allowed a developer to select one style (or no style) for the entire application. Starting with RAD Studio 10.4 VCL library will allow you to use multiple VCL styles at the same time in different forms of your applications, or even different controls of the same form. You can also mixed styles of elements (controls and form) and elements using the Windows default platform theme. This feature is controlled by a new StyleName property for the TControl class. This property takes as value the name of one of the styles active for the application and applies the style to the given control. If the property is empty, the parent control style is used: so if you set the property for a form, all controls in the form take the form style by default. A Quick Demo As the name implies, per-control styling allows a developer to apply different styles for controls and forms in the same application. To start, you need to add multiple styles to an application, and you can use all of them. This feature works only if one of the VCL Styles is active. First, add multiple styles to an app (hint, in RAD Studio 10.4 VCL you can use the new high-dpi styles, that’s for another blog post): Now set different styles names for different controls in a form, like in the following DFM file (I kept only key relevant properties here): object Form2: TForm2  StyleName = ‘Sky’  object Panel1: TPanel    StyleName = ‘Light’    object Button1: TButton…    object Button3: TButton      StyleName = ‘Sky’    end  end  object Button2: TButton    StyleName = ‘Windows’  end  object Button4: TButton    StyleName = ‘Luna’  end  object Button5: TButton    StyleName = ‘Aqua Graphite’  endend Notice that Button1 takes the hosting panel style, while Button2 resets the style to the form one. Finally, ‘Windows’ is a special purpose value, as described below. With this code, here is the UI of a form with 5 buttons using 5 different styles: A Few Rules for RAD Studio 10.4 VCL There are different approaches you can use to to adjust the style of the different forms and controls of a VCL application: 1. Adjust style list in project options (but you can also load styles at runtime). 2. Use the TControl.StyleName property to define the specific style for each control or each form. The StyleName value must be one of the names of the styles in the project options. A control can use the StyleName defined for its parent control, so you can set the StyleName property of a form to have specific style used by all controls on it. Additional cases: By default, TControl.StyleName is empty and control uses a default style. You can set StyleName as ‘Windows’ to disable applying any style for control or form. If you set a style name that is not among the loaded VCL styles, then the control will use default style. 3. You can define a specific style also for common dialogs. Use the property  TStyleManager.DialogsStyleName for that. By default, it is empty and common dialogs use the default style of the application. 4. You can define the application style as ‘Windows’. This means that if some control or form has an empty StyleName property, then it will always use ‘Windows’ style and VCL Style will be always […]

Read More

5 Unique Delphi features for Windows 10

To the average non-technical computer user, Windows10 might seem as just another Windows version. I still hear both non-technical users and developers ask why they should leave Windows 7 behind. What exactly is so unique about Windows 10? In order to understand why Windows10 is awesome, we first have to take a step back to the previous edition of Windows, namely Windows 8. A bit of context At the time when Windows 8 was the latest thing, Microsoft was still active in the mobile market, and Windows 8 represented a substantial refactoring of the Windows family. Microsoft made no secret of their plans to eventually retire x86 in favour of ARM (which is still a goal for both Microsoft and Apple), and in order to deliver said platform transparently, the OS was to be engineered from the ground up. The result of this effort was WinRT (Windows Runtime), a chipset agnostic architecture that, once adopted, enabled developers to write applications that could be compiled for any CPU, providing the code was source-compatible (not unlike FireMonkey and its abstraction layer over desktop, mobile and embedded). The idea was initially to retire the aging WinAPI and thus make the entire Windows eco-system portable. But WinRT has not replaced WinAPI, instead it co-exists and compliments the system. Universal Windows Platform (UWP) Needless to say the Windows 8 journey did not go as Microsoft had planned. They took Windows Mobile off the market (which is a great shame, Windows Mobile was wonderful to use) and decided to focus on what they do best; namely the Windows desktop. UWP (universal windows platform) can be seen as a kind of successor to WinRT. It incorporates the same technology (so WinRT is still there) except it has broader implications and embrace more diverse technologies. The most important being that it allows other languages, and developers that don’t use Visual Studio to co-exist without the restrictions of Windows 8 (WinRT was C++ only). Microsoft also added an emulation layer to UWP, to make sure applications written for x86 and WinAPI can seamlessly run on ARM. I should underline that Delphi features for Windows 10 has support for the WinRT APIs that are now an intrinsic part of Windows 10. There are some 40 units in the VCL (under the WinAPI.* namespace) that let you work directly with that aspect of Windows. As well as components written especially for Windows 10, that we will cover briefly in this post. Right then. Lets jump into my top five features and have a closer look! 1: Scaling and DPI awareness If you have updated to Windows 10 you have undoubtedly noticed that graphics are smoother than under Windows 8 (and especially Windows 7), and that Windows will scale form content if you are using a monitor that supports high DPI. This feature goes deeper than you might expect, because users can have both HD and SD capable monitors connected to the same machine – and Windows 10 will ensure that applications look their best regardless of DPI count. Support for DPI awareness for monitors, has to be defined in the application manifest, but this is now a part of your project options inside the Rad Studio IDE. So making your desktop application DPI aware is nothing more than a 2-click operation. […]

Read More