Easily move your Windows/VCL apps to Delphi XE5 and gain tons of benefits

Posted by on in Blogs
Regardless of the previous version of Delphi you are using, there are a large number of benefits you will gain by moving your projects forward.  There is also a special offer for all Delphi customers (regardless of the version you are using) to move up to our latest XE5 release. I am sure that you see that there a lot of great new technology available to you as a Windows VCL developer.

Delphi XE5 Technologies you can use today in your Windows/VCL apps

  • Sensors - You can use the System.Sensors unit and classes in your Windows/VCL applications. The TSensorManager class can be used to identify the sensors connected to the computer and make them available for use within Delphi applications.

  • FireDAC - The fastest and most powerful Universal Data Access library ever! FireDAC enables native high-speed direct access from Delphi and C++Builder to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, DataSnap and more.

  • New REST Client Support - Simple invocation of REST web services from any third party provider and includes authentication support and JSON response manipulation, with dataset and LiveBindings mappings.

  • LiveBindings - LiveBindings is an expression-based framework that provides fast, easy and no-code data-binding to bind objects to other objects or to dataset fields. While you can continue to use your VCL data bound components, in XE5 all VCL visual controols contain a LiveBindings property.  You get the benefit of the LiveBindings Wizard, LiveBindings Designer and rapid application prototyping using the TPrototypeBindSource.

  • VCL Styles - Control and change the appearance of a complete VCL application with VCL Styles, including the appearance of every part and state of a control. You can also create your own custom styles using the Bitmap Style Designer.

  • 64-bit Windows - Push the envelope of performance by creating 64-bit Windows applications that take advantage of the latest hardware and access more memory.  In your the IDE project manager window, right mouse click on the Target Platforms node and choose "Add Platform" and select "6t4-bit Windows".  Rebuild your project and you now have a 64-bit executable.

  • Unicode - XE5 ensures that your apps are available to a global workforce of users and marketplace of customers. Delphi is fully Unicode-compliant. While new data types have been introduced, existing data types remain and function as they always have. Based on more than five years of in house and customer experience with Unicode, your applications should migrate smoothly to the Unicode world.

  • Surface Pro Tablets - With the Metropolis UI in Delphi, you can take your VCL applications and create applications that incorporate the latest Windows 8 styling and functionality in an easy and accessible way.

  • VCL Performance and Quality Improvements - XE5 both fixes and contains the culmination of thousands of performance and quality improvements reported against every version of Delphi from Delphi 7 to XE4.

What Delphi XE5 can give you compared to your current version

Getting the Ambient Light Lux Value on my Samsung Slate Series 7

Here is a Windows/VCL example that gets the Ambient Light value on my Samsung Slate Series 7 tablet. Create a new VCL Delphi application. Put a button and three labels on the form. Set the form caption to "Get Ambient Light VCL Demo". Set the button caption to "Get Ambient Light". Set the first label to hold the caption for the Lux (light value) label. Set the second label's name to "AmbientLightSensorLabel" (this is used to display a message for whether an Ambient Light Sensor is found or now). The third label is going to contain the ambient light value, name this label "LuxLabel". For the Button's onClick event handler use the following code (remember to include the uses statement in the implementation section for the System.Sensors unit):
{$R *.dfm}
uses System.Sensors;

procedure TForm1.Button1Click(Sender: TObject);
MySensorArray : TSensorArray;
MyAmbientLightSensor : TCustomLightSensor;
TSensorManager.Current.Activate; // activate sensor manager
// use GetSensorsByCategory to see if a Light sensor is found
MySensorArray := TSensorManager.Current.GetSensorsByCategory(TSensorCategory.Light);
if MySensorArray <> nil then begin // check if Ambient Light Sensor is found
AmbientLightSensorLabel.Caption := 'Ambient Light Sensor Found';
MyAmbientLightSensor := MySensorArray[0] as TCustomLightSensor;
LuxLabel.Caption := FloatToStr(MyAmbientLightSensor.Lux); // display the Light sensor value
else begin
AmbientLightSensorLabel.Caption := 'Ambient Light Sensor Not Found!'
TSensorManager.Current.DeActivate // deactivate sensor manager

Here is the app running on my Samsung Slate Series 7 with the afternoon light here in Scotts Valley at around 3pm today:

Using Sensors with Delphi VCL

Here is a blog post showing how you can integrate Windows based sensors in your DelphI VCL applications. The blog post references Delphi XE3.  You can use the same code with Delphi XE5. See the source code and output at http://blogs.embarcadero.com/davidi/2012/10/03/41699. The following screen shots were grabbed from my Windows 7 VM (hosted on MacBookPro using VMWare Fusion for the Mac) and my Samsung Slate Series 7 running Windows 8.

Special Offer - Upgrade to Delphi XE5 from any previous version (expires Dec 31, 2013)

The offer is "Buy RAD Studio, Delphi or C++Builder version XE5 at the low upgrade price if you have any earlier version of Delphi, C++Builder, RAD Studio or Borland Developer Studio." How to get it? Purchase a RAD Studio, Delphi or C++Builder XE5 upgrade. Available only between October 22, 2013 and December 31, 2013.
Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.
Comments are not available for public users. Please login first to view / add comments.