Delphi

Learn How To Build MVVM Pattern Based App In 20 Minutes

MVVM is a software architectural pattern that facilitates the separation of the development of the graphical user interface via a markup language or GUI code from the development of the business logic or back-end logic so that the view is not dependent on any specific model platform. In this Skill Sprint in 20 minutes, you can learn how to apply this MVVM pattern to your Delphi applications smoothly.  Model-View-ViewModel The MVVM design pattern decouples your application code and separates the concerns of your application. You must care about MVVM because it is the way to write maintainable, testable code. The compelling reason is the ease of maintenance. Utilize MVVM and, your app will never become a legacy application. How can you achieve within Delphi? The answer is separating the software. ViewModel – Present data to the view View – User interface Model – Business logic or back-end Be sure to watch the whole session to learn more about the MVVM pattern and the demo using the Delphi.

Read More

FL Studio Is A Massively Popular Digital Audio Workstation Software Built In Delphi

Image-Line Software is the Belgian based creator of FL Studio, one of the most popular Digital Audio Workstations (DAWs) available on the market for creating music. FL Studio is installed more than 30,000 times per day (more than 10 million installations a year) by users in more than 200 countries, including power users such as Avicii, Martin Garrix, Afrojack, and Mike Oldfield. “Delphi is very important for us as a development tool because it allows us to do inline assembly and link function to the code directly. With classic development tools, that process is much clumsier. However with Delphi you can just add a button and double click; it speeds up coding and allows us to work in the language we know best.” – Jean-Marie Cannie, CTO and Founder Case Study https://www.embarcadero.com/case-study/image-line-software-case-study Download https://www.image-line.com/ Screenshot Gallery

Read More

30+ Delphi Units For The Next Level DevOps

GpDelphiUnits is a collection of Delphi units by Primož Gabrijelčič. These Delphi Units might help you to do some work quickly and efficiently. This is an open-source project and you can check out the full source code on over GitHub. What you can get from these units? Here are some of the available units with aims: DSiWin32 Collection of Win32/Win64 wrappers and helper functions. GpCommandLineParser Attribute-based command line parser. GpForm A simple form with some enhancements. GpHttp Asynchronous HTTP GET/POST with ICS and OmniThreadLibrary. GpHugeF Interface to 64-bit file functions with some added functionality. GpLists Various TList descendants, TList-compatible, and TList-similar classes. GpLockFreeQueue The sample implementation of a dynamically allocated, O(1) enqueue and dequeue, threadsafe, micro locking queue. GpManagedClass Smarter base class. Handles error codes, has a precondition and postcondition checker. GpStructuredStorage Structured storage (compound file; file system inside a file) implementation. GpStuff Various stuff with no other place to go. GpSync Enhanced synchronization primitives. GpSysHook The main unit for the GpSysHookDLL. Implements system-wide keyboard, mouse, shell, and CBT hooks. Supports multiple listeners, Delphi Units, automatic unhooking on process detach, and only installs the hooks that are needed. Supports notification listeners and filter listeners (should be used with care because SendMessage used for filtering can effectively block the whole system if the listener is not processing messages). Each listener can only listen to one hook because the hook code is sent as a message ID. All internal IDs are generated from the module name so you only have to rename the DLL to make it peacefully coexist with another GpSysHookDLL DLL. GpTextFile Interface to 8/16-bit text files and streams. Uses the GpHugeF unit for file access. GpTextStream Stream wrapper class that automatically converts another stream (containing text data) into a Unicode stream. The underlying stream can contain 8-bit text (in any codepage) or 16-bit text (in 16-bit or UTF8 encoding). GpTimezone Time zone conversion. GpVCL VCL helper library. GpVersion Version info accessors and modifiers, version storage, and formatting. SafeMem GetMem/FreeMem wrapper that checks for block overruns. SpinLock A scalable atomic lock Head over and check out the full project source code and documentation here!

Read More

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

Embarcadero Subscription Benefits – Highlights for September 2020

Embarcadero Subscription will help Your team to focus on most important things – increase efficiency and Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy. RAD Studio Update for Embarcadero Subscription benefits continues to expand. In addition to multiple FREE components and tools available to Update Subscription customers, we want to highlight several exciting features for September related to the 10.4 / 10.4.1 releases.  Custom HighDPI ready VCL Windows Styles  In 10.4, we significantly extended the VCL Styles architecture to support High DPI and 4K monitors. All UI controls on the VCL form are now automatically scaled for the proper resolution of the monitor the form is displayed on.  Each UI element can be selected from a library of multi-scale versions and scaled to any DPI, resulting in crisp UI elements on all monitors. The following 13 custom VCL styles have been updated to fully support High DPI with your VCL applications: Calypso Stellar Wedgewood Light Material Oxford Blue Puerto Rico Material Patterns Blue Windows 10 Modern Malibu Windows 10 Modern Blue Whale Windows 10 Modern Clear Day Windows 10 Modern Black Pearl Flat UI Light Lucky Point Zircon Parallel Debugger  Today’s applications don’t just run on one thread – they’re spread over the main UI thread and multiple parallel threads all inter-operating. Yet most IDEs are built around interacting with one thread at a time when debugging, or have debugging controls that aren’t even aware that more threads might exist at all. Debugging thread interactions can be hard, really hard… and we have the solution: a new parallel extension to RAD Studio designed for understanding and controlling what your multi-threaded application is doing. Visualize thread call stacks in parallel. See multiple threads indicated inline in the code editor. Control execution on a per-thread basis. And more! This exciting new extension is coming soon exclusively for Update Subscription customers using RAD Studio 10.4.1. TwineCompile: speed up C++ builds  C++ can be slow to compile, for all C++ IDEs – and TwineCompile is the answer. This amazing C++Builder extension parallelizes C++ builds, speeding them up by the number of cores in your machine – making your project build in half, a quarter, or even less time. This add-on is one of the best productivity extensions available for C++ development. Depending on your application size, it’s possible to save an hour or more per day – a huge time saver for your entire development team! There are three short, two-minute videos introducing TwineCompile and how to use it: probably the best six minutes you could spend today improving things for your C++ team. You can get TwineCompile now for C++Builder with your Update Subscription — including for Professional edition customers! Updated FMX Linux We also recently updated the FMXLinux package for Delphi in GetIt. The latest version has full support for 10.4.1 and includes a number of quality improvements.

Read More

Delphi 10.4 Sydney – the best tool for creating Windows Apps

Delphi has long been a favorite tool of many Windows developers. After launching new Delphi 10.4 Sydney that statement may be considered as simply wishful thinking to many people, but sometimes the truth is not as obvious as it should be. The ‘truth’ to many is that Visual Studio is the ultimate tool for Windows developers. While I may concede that truth for many C++ developers, it’s definitely debatable for .NET developers. (Simply ask a Visual Basic developer how they feel about no more language features planned.) Many .NET developers started with WinForms back in 2002 – including a whole bunch of Delphi developers that jumped ship to the greenfields of .NET from what many consider a historical pinnacle of Delphi development, Delphi 7 (an ancient version which many developers still use today!) Some developers have stayed with WinForms over the years, but many moved to WPF and XAML in .NET 3.0 back in 2006. Others chose to take the five-year Silverlight boondoggle starting in 2007. WPF went stagnant around 2013 as the year prior Microsoft released Metro Apps in Windows 8. Microsoft quickly shifted the label to WinRT in Windows 8.1. By 2015, an updated app platform for Windows 10 was named UWP as the new ‘final’ solution but again the improvements didn’t help it to gain traction. Microsoft was recognizing the obvious resistance and quickly created new technologies to bridge applications across various platforms. They developed an iOS bridge, an Android bridge, a web apps bridge, and a classic Win32 desktop apps bridge. (Did you know that there still is an Objective-C for Windows?) The Android bridge is dead. While the Win32 bridge is still active, it has not been utilized much. The new ultimate solution starting in late 2019 has been .NET Core 3.0 and most of the old technologies like WinForms are being reinvigorated to work with it (well, except Silverlight of course!) The new goal is to make “every platform feature available to every developer” to solve the “massive divide” between platforms due to the rejection of UWP. (Note that WinForms and WPF are not cross-platform options with .NET Core 3.0 so they get rejected once again.) The very latest technology revolution unveiled by Microsoft in the last few days is Project Reunion. This is supposed to be the new way to drag all the Win32 applications into the future (something they have been trying very hard to do over the last 14+ years!) A quote from Microsoft: “The idea behind Project Reunion is that it allows developers to build one Windows application and target all 1 billion Windows devices….We’re bringing together the combined power of Win32 and UWP so developers no longer have to choose because we’re unifying these existing APIs and in some way decoupling them from the OS.“ I would pose a fairly significant question behind Microsoft’s bold statement of a billion Windows devices out there: how many applications on those billion devices are Win32 versus UWP? I’m sure Embarcadero has a strong opinion on that specific topic! To be fair, there are a few dozen people in that commune in Belize which still use Windows Phones. And there are a few thousand people using the $3,500 HoloLens headsets. (It’s $1,500 less than their first version after all so it’s bound to […]

Read More

Top 3 features in Delphi 10.4 Sydney to try

Following the beta testing period and some blog post-pre-announcing some of the key features, on 27 Mai 2020 Embarcadero officially released RAD Studio 10.4 Sydney, which includes Delphi 10.4 Sydney. My Top Three Features There are many new features in the product. For Delphi developers the key are: The first cut of Code Insight based on Language Server Protocol. This is a huge step for the product, a new foundation for the future of the “IntelliSense” capabilities. From this foundation, we’ll continue to improve and expand in the future. Top feature is completion within words — rather than starting with what you type. Nice side effects, much better red squiggles. The introduction of custom managed records. Records in Delphi are extremely powerful and handy (with methods and operators overloading) now custom initialization and finalization add more power The extensive enhancements on VCL, with support for High DPI Styles and new platform support with TEdgeBrowser control, among many other features (Per Controls styling, TTitleBar, Virtual Image component, updated API declarations…). FMX and RTL and many other areas got improvement, but the work on VCL has been really extensive for this release There is way more in the product, this is just my personal take of the top 3 areas we worked on. Extensive bug fixing is another key element of Delphi 10.4 Sydney, with one of the highest numbers of public reported bug fixed in a release. And the return of a very nice classic Delphi Greek helmet logo! Noteworthy Links The official RAD Studio 10.4 announcement by Sarina is at https://community.idera.com/developer-tools/b/blog/posts/rad-studio-10-4-now-available-learn-more Direct download of the online installer from the new download portal: https://my.embarcadero.com/#downloadDetail/692 The YouTube What’s New video: https://www.youtube.com/watch?v=cRWWzd_yaig&feature=youtu.be The 10.4 Demos on GitHub at: https://github.com/Embarcadero/RADStudio10.4Demos What’s new web page: https://www.embarcadero.com/products/rad-studio/whats-new-in-10-4-sydney What’s new docwiki page: http://docwiki.embarcadero.com/RADStudio/Sydney/en/What%27s_New Minor features and list of fixed issues: http://docwiki.embarcadero.com/RADStudio/Sydney/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_10.4 Official press release: https://www.businesswire.com/news/home/20200526005263/en/RAD-Studio-10.4-Accelerates-Native-Windows-Development (I’m even quoted in it!) Interested in a trial? https://www.embarcadero.com/products/rad-studio/start-for-free Feature matrix (PDF): https://www.embarcadero.com/docs/rad-studio-feature-matrix.pdf

Read More

Start your IoT solution with RAD Studio 10.4

Let’s say for example that you want to create a heart rate monitor app. You’ll need information about the heart rate GATT profile to connect to and collect data from the bluetooth enabled HR monitor device. GATT profiles are high level definitions that define how to use standard services in your applications. The heart rate GATT profile is used for fitness or health applications. The server device with a heart rate sensor exposes the standard heart rate service so that the Bluetooth LE client discovers the service and starts collecting data, for example the bpm (beats per minute). The GATT profile is the combination of service + characteristics. You could research all of these specifications on your own, or you could skip ahead by using our prebuilt IoT heart rate sensor component.  IoT Solution with RAD Studio 10.4, we not only provide  Bluetooth components out of the box, but also offer over 50 prebuilt IoT device components for many popular devices, ranging from home automation, to fitness gadgets, medical devices, environmental sensors and more. They are downloadable via the GetIt Package Manager in RAD Studio 10.4 Sydney (Tools > GetIt Package Manager) and include both BLE and Z-Wave components. For example, you can quickly build your own fitness application using either the generic ThingConnect heart rate service component or a device specific IoT component. We provide ready-to-use sample apps for each of the IoT components in GetIt.   The IoT framework for Bluetooth LE based devices uses TBluetoothDeviceDiscoveryManager to manage the connection with an IoT device as a general Bluetooth LE based connection mechanism and wraps each device as a component. For instance, the TWahooTICKRHeartRateMonitor component wraps the Wahoo TICKR Heart Rate Monitor. The TBluetoothDeviceDiscoveryManager component provides the basic mechanism for connecting to Bluetooth LE based devices. In the TBluetoothDeviceDiscoveryManager component, you can define timeout and a number of re-tries to connect for these devices. To build a ThingConnect application, you need the following components: The TBluetoothDeviceDiscoveryManager component is used to set up the connection with the device. The corresponding ThingConnect device component is used to retrieve the services and the characteristics data from the device. Using the TPolarHeartRateMonitor component, it’s easy to connect to the Polar H7 heart rate sensor, and start monitoring the Heart Rate service, including subscribing to HR measurement data updates, and retrieving the building sensor location. You can find a step-by-step tutorial on how to build your own heart rate tracking application using RAD Studio here. IoT Solution With RAD Studio 10.4, we provide fully customizable user interface templates. Using one of the FireMonkey UI templates provides a great starting point for building a visually stunning fitness application. Shown: FireMonkey UI template – Home Screen 3, available in GetIt.  

Read More