Delphi

Easily Download And Install A Robust Syntax Highlighter For Delphi And C++ Builder From GetIt

SynEdit for Delphi and C++ Builder. This is a highly mature syntax highlighting edit control, not based on the Windows common controls and supported on Windows. Orwell Dev-C++, Embarcadero Dev-C++, and PyScripter IDEs all use TSynEdit. Once you install this SynEdit component package to your RAD Studio you start having lots of ideas to build amazing applications. Because with SynEdit you can solve many problems in your application by just dragging and dropping the component.  What you get from SynEdit VCL: Editor with syntax highlighters AutoCorrect and AutoComplete Non-Visual Components and many more non-visual components to utilize with SynEdit How can I get this SynEdit VCL? Run the RAD Studio Open the GetIt Package Manager from the Tools menu Search “synedit” and install the package Application Ideas to build with SynEdit components Code Editor – it can be a lightweight and simple editor with tens of different syntax highlighters Programming Educational Apps – since everyone learning from home using their computers, you can create a simple and effective coding platform for kids to code and learn. You can also check out the full source code over on GitHub: TurboPack SynEdit – GitHub Get an overview of the SynEdit VCL control in GetIt and then download it from GetIt in the IDE.

Read More

Quickly Learn Mocking In Delphi With Spring4D

In this CodeRage session, Bernd Ua shows you the power and benefits of unit testing and mocking with Spring4D open-source framework. Overview of the Spring4D Spring4D is a great open-source framework to leverage the power of Delphi. In this session, you will learn about the mocking framework contained in Spring4D. We will see how easy it is to get started with mocking and mock out interfaces your classes under tests are using. What is mocking? If you are mocking out something you replace a productive implementation with a special implementation for testing, the so-called mock You can write Mocks manually or use ones that have been automatically created by frameworks The difference between mocks and stubs or dummies is some extra code to log and heck calls made to the mock What a Unit test should not do A Unit test should better not use Databases Network access File Systems External Resouces A Configured Environment So, if your unit test uses one of the above it is more likely an integration test. Be sure to watch the CodeRage session to learn more about mocking and mocking practices in action!

Read More

Powerful Cross Platform Multitrack Music Recording Software Built In Delphi FireMonkey

MultitrackStudio from Bremmers Audio Design is a multitrack music recording software which supports recording, editing and mixing audio and MIDI tracks. With the growth of Mac worldwide, MultitrackStudio developers felt the urgency of making their application available on macOS. They had previously used Delphi with VCL (Visual Component Library) a visual component based object oriented framework for developing Microsoft Windows applications. When Embarcadero Technologies released Delphi with FireMonkey, MultitrackStudio developers reworked their custom controls to work with both VCL and FireMonkey. The Delphi RTL (run time library functions and procedures) provided them with cross platform versions of most common functions and they could program against any C or Cocoa framework. After writing some Mac specific code including Core Audio and Audio Units, they had a running version on macOS. Website https://www.multitrackstudio.com/ Case Study https://www.embarcadero.com/case-study/bremmers-audio-design-case-study Screenshot Gallery

Read More

Start Developing Fast Native Windows Applications With Delphi VCL

In this tutorial, you will learn how to create a Delphi VCL application from the ground. What can you learn from this tutorial: Three common components Explanation of Object Pascal source code Debugger How to change Target Platform (32 or 64 bit) Adding a watchlist Where to learn more about the Visual Component Library? VCL is one of the best known visual component library available in the universe. If your business relies on the Microsoft Windows OS, you should go with VCL! And here are the best sessions available to you to grasp a big body of information. Be sure to check out the external resources and happy learning!

Read More

Quickly Evaluate A Python Expression In Delphi Using Python4Delphi Sample App

Want to know how to evaluate a Python Expression in Delphi using Python4Delphi? Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and C++Builder. They let you easily execute Python scripts, create new Python modules and new Python types. This post will guide you on how to use these components, create a VCL application, run a simple python expression in it, and shows the output message. Python4Delphi Demo2 Sample App shows how to Evaluate a Python Expression by typing the python expression in a Memo, execute and show the message. You can find the Demo2 source on GitHub. Check Demo1 on how to run a simple python script in Delphi. Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi Components used in Python4Delphi Demo2 App: TPythonEngine: A collection of relatively low-level routines for communicating with Python, creating Python types in Delphi, etc. It’s a Singleton class. Some of the key properties for the component listed here. AutoLoad: Enable this property to load the python DLL automatically. It defaults to true. AutoUnload: Enable this property to unload the python DLL automatically. It defaults to true. DllName: By default, it reflects the latest e.g. python39.dll. But you can provide your registered version. DllPath: Physical location of the Python DLL. InitScript: You can provide the python script here to execute implicitly. IO: Associate the TPythonGUIInputOutput component to this property. RegVersion: Registered python version e.g 3.9. UseLastKnownVersion: If you want to use the latest registered Python version installed set this property to True. 2.TPythonGUIInputOutput: Inherited from TPythonInputOutput (which works as a console for python outputs) Using this component Output property you can associate the Memo component to show the Output. MaxLineLength: Maximum character length per line. MaxLines: Maximum python script lines can be executed using this component. OutPut: Associate the Memo component to show the output. RawOutput: Produce the result as raw output. UniCodeIO: Set true to provide Input and output as Unicode. 3.TMemo: A multiline text editing control, providing text scrolling. The text in the memo control can be edited as a whole or line by line. You can find the Python4Delphi Demo2 sample project from the extracted GitHub repository ..Python4DelphiDemosDemo02.dproj. Open this project in RAD Studio 10.4.1 and run the application. Implementation Details: PythonEngine1 provides the connection to Python or rather the Python API. This project uses Python3.9 which can be seen in TPythonEngine DllName property. PythonGUIInputOutput1 provides a conduit for routing input and output between the Graphical User Interface (GUI) and the currentlyexecuting Python script. Memo1, used for providing the Python Expression and Memo2 for showing the output(instead Memo2 used ShowMessage to show the expression result) Buttons to perform the execution, load script from, and save the script to file. On Clicking Execute Button the script expression is executed using the below code. procedure TForm1.Button1Click(Sender: TObject); var Result : PPyObject; begin with PythonEngine1 do begin Result := EvalStrings( Memo1.Lines ); if Assigned(Result) then begin ShowMessage(Format(‘Eval: %s’,[PyObjectAsString(Result)])); Py_DECREF(Result); end else ShowMessage(‘Could not evaluate the script’); end; end; procedure TForm1.Button1Click(Sender: TObject); var   Result : PPyObject; begin   with PythonEngine1 do     begin       Result := EvalStrings( Memo1.Lines );       if Assigned(Result) then         begin           ShowMessage(Format(‘Eval: %s’,[PyObjectAsString(Result)]));           Py_DECREF(Result);         end       else         ShowMessage(‘Could not evaluate the script’);     end; end; EvalStrings will evaluate the Mathematical expression provided in the Memo1 and return the Python Object(PPyObject). We […]

Read More

Learn Game Development With Delphi FireMonkey In This Delphi Bootcamp Session

In this Delphi Bootcamp session, you can learn about how to create cross-platform games with Delphi FireMonkey.  If would like to learn about the industrial game development use case in Delphi FireMonkey, be sure to check out the Rise of Legions game by Broken Games Studio which has over 100,000 subscribers. Overview Four Classic Arcade Games Alien Invasion Mars Rocket Rocket Ship Delta Space Rocks Supports Android/iOS/OSX/Windows Architecture: Putting It All Together TRectangle – As in image container Frames for UI Motion Sensor High Score via SQLite & LiveBindings Object Pooling Sprite Sheet Animation App Tethering Cross-Platform Sound Architecture: Game Loop TTimer with an event every 36ms Process game events like game over and level complete Process player inputs including Accelerometer Process explosions and projectiles Process enemy movements and events Process power-ups Handle collision detection for all entities Handle looping in the music Moreover, you can find epic Delphi Game Engines here:

Read More

Easily Customize Your Delphi VCL Application With Dark And Light Themes According to Windows Mode

Many times we need to override windows default settings or customize our application by code, irrespective of user settings in windows for better user experience. Your application has been built with options to apply certain themes and the user also has the flexibility to change Windows themes for entire windows/apps. In this case, your application user experience should not be affected by user system settings. This post can guide you to set the themes in your Windows VCL application. How to check whether dark mode is enabled? Press Windows + R -> Type Regedit cmd in Run Command window. Navigate to the folder: ComputerHKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionThemesPersonalize. Check AppsUseLightTheme Keyword and if its value is 1 then the windows apps theme is in Light mode and 0 means it’s in Dark mode. How to set the themes in Delphi from project options : In Delphi IDE, Go to -> Project Menu -> options -> appearance -> Select the available themes suitable for your application. Carbon for Dark theme for example. You application theme settings: If you want to give a better user experience explicitly irrespective of (or) according to windows themes selected by the user in the machine, first programmatically check the app theme mode. Navigate to the following location ComputerHKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionThemesPersonalize and get the keyword AppsUseLightTheme value. Accordingly build your logic of setting the VCL theme using the VCL API to set the themes. Note: Platform specific conditional defines need to be included accordingly if it is cross platform application. Check the below Video for the full demonstration of setting the dark/light theme Vice-versa for a VCL application. Check out the latest Delphi 10.4.1 which supports High DPI Styles and VCL per control styling for your applications.

Read More

Powerful Shipping Container Cargo Optimizer Built In Delphi FireMonkey

Dreamsofts Optimization Ltd. has an award winning shipping container cargo optimizer available in the iOS and Mac stores. The application is also available on Windows and is built in Delphi FireMonkey. Both a professional and an enterprise version are available with different feature sets. The application is described as “First container loading and pallet loading on mobile platform. You have found the easiest container/pallet loading optimization application. Simulate loading your cargo in minutes, not hours or days ! Maximize your shipping with boxes and container/truck/pallet and save money and time.” Some of the awards that the app has received are “Winner Retails & Supply Chain Application Thailand ICT Award 2014” and “Merit award Asia Pacific ICT Award 2014”. It really is an amazing looking application and utilizes the full features of FireMonkey to make it happen. Website http://www.cargooptimizer.com/ (Download) App Store https://apps.apple.com/us/app/cargo-optimizer-max-for-ipad/id1292163026 Mac Store https://apps.apple.com/app/id1481054645?mt=12 Screenshot Gallery

Read More

Create Visually Stunning VCL Application With Konopka Signature VCL Controls 6

KSVC – Konopka Signature VCL Controls 6 is a suite of over 200 Windows UI controls and designers for your Delphi and C++ Builder VCL applications. Konopka Signature VCL components provide unmatched attention to detail, ease of use, and versatility. KSVC also supports full VCL Styles, which can deliver custom and stunning modern Windows applications. To utilize the KSVC components, you should install it from GetIt Package Manager. If you need a guide for using GetIt, follow these steps. KSVC components provide many stunning UI controls for your VCL applications, which you cannot get within RAD Studio. Moreover, you can customize components with quick access to an extensive array of component customizations. If you would like to learn more about Konopka Signature VCL Controls 6 be sure to check out these sources: Konopka Signature VCL Controls – Ray Konopka Overview of New Windows 10 VCL Controls with Ray Konopka – CodeRageXI Head over and check out the listing for the Konopka Signature VCL Controls in the latest version of Delphi available via GetIt in the IDE.

Read More

Learn How To Implement A Custom Resource EMS Package To Extend RAD Server In Delphi

The CustomLogin sample is a server-client EMS demo, that demonstrates how to implement custom Login and Signup endpoints in a custom resource. It requires InterBase to be installed on the machine to connect to the EMS server. Make sure that the EMS Server is running before you run the client project. Location You can find the CustomLogin sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to either: Object PascalDatabaseEMSCustomLogin CPPDatabaseEMSCustomLogin Subversion Repository: You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. How to Use the Sample Run the EMS CustomLogin Package When you run the CustomLoginPackage project, the EMSDevServer starts automatically. The supported platforms for this sample are: 32-bit and 64-bit Windows. Navigate to one of the locations given above and open: Delphi: CustomLoginPackage.dpk. C++: CustomLoginPackageCpp.cbproj. Press Shift+Ctrl+F9 or choose Run > Run Without Debugging. The EMS Development Server opens.If it is the first time you are using EMS on the machine, you need to run the configuration wizard in order to create the EMS server configuration file. When the Confirm dialog opens, click Yes. Click Next until the installation finishes. The EMS Development Server starts automatically. Run the Client Application The client expects the EMSDevServer to be running at localhost:8080. If you are running the server at a different address, modify the properties of the TEMSProvider component. To run the sample on a different machine that the EMS Server, change the URLHost property of the TEMSProvider component to the IP address from the machine where the EMS Server runs.Note: The TEMSProvider component is placed in the CustomLoginClientU unit. On the Project Manager, right-click on ProjectGroup1. Click Add Existing Project…. Navigate to one of the locations given above and open: Delphi: CustomLoginClient.dproj. C++: CustomLoginClientCpp.cbproj. Press F9 or choose Run > Run. Select Use Custom Resource (CustomLogin) to use your Window credentials to authenticate in the EMS Server. In the Signup or Login tabs, insert a UserName and Password and click the buttons: Use the Signup tab to sign up a new user and log on to the EMS Server with that user. Use the Login tab if you previously created an account. Click the Logout button to log off from the EMS Server. In the User tab you can manage your user data: Click the Delete user to delete the user from the EMS Server. Click the Retrieve Fields button to get the custom description field from the EMS Server. { “description”:”New info” } Click the Update Fields button to modify and update the custom description field in the EMS Server. Note: The custom Login and Signup endpoints validate the UserName and Password against Windows users by calling WinApi.Windows.LogonUser. You need to sign up with valid Windows credentials. Implementation EMS Custom Package The custom login package implements custom Login and Signup endpoints, by matching the signature of the Users.LoginUser and Users.SignupUser and implementing these methods. The custom public endpoints are: CustomSignupUser to sign up a new EMS user. CustomLoginUser to log in an existing EMS user. Client Application The client application has a TEMSProvider component, that: The information is managed with TJSONObject and TJSONArray. Please visit the original Embarcadero post for more information about this samble: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/EMS.CustomLogin_Sample

Read More