Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiIDEWindows

Windows 10 Apps Development Tutorial for Beginners

Are you looking for a Windows 10 apps development tutorial for beginners? There are numerous reasons why you might need to develop a desktop application. You might want to organize the data for your business so that everything is easily accessible. Perhaps you have an idea to create a computer program, game, utility, or application for commercial market release. Maybe you have thought up a great way to help out a charity or local neighborhood group.

In any case, if deployed in the right manner, apps be a way to generate an income or to be helpful to people by automating tasks or aiding in other ways. If you’re looking to create apps which have the easiest level or technical knowledge and make the most impact then it’s worth realizing that despite the popularity in mobile devices such as phones and tablets the number one target for a software developer is a desktop machine. For the majority of people, thanks to the success of Microsoft that desktop machine is probably running Windows 10 or to a lesser degree its younger sibling Windows 11.

Therefore, let us share some fundamentals of Windows 10 apps development with you.

Is a desktop app right for you?

When it comes to applications, you have three essential options to choose from: desktop apps, mobile apps, or web apps.

While desktop apps have the power and dependability to meet your requirements, web apps should not be overlooked but be mindful that delivering web apps requires some compromises and a suitable – and secure – place for them to be hosted. If you’re storing or handling personal data with your app you should research into the best ways to do that securely for a web app. Note also that different countries and jurisdictions can have their own rules about how to handle, store and transmit any personal data as well as a confusing array of non-obvious regulations about things like web browser cookies and accessibility considerations for users with physical impairments.

Windows 10 Apps Development Tutorial for Beginners an image of a desktop computer

Should I create a mobile app?

At the same time mobile apps are also an option depending on the requirements of the project. Each has advantages and disadvantages that you must weigh in order for your application to be successful. But it’s worth mentioning that while mobile development is reasonably easy, especially with the right cross-platform development tool, there can be many hurdles to jump over. For example, deploying a mobile app on Android can be as simple as compiling the app and then copying it to the user’s device as an “ad hoc” app. But that’s not commonly how things are done, most developers have to contend with the device provider’s app store. For Apple this is the Apple App Store. For Android this is usually the Google Play Store or a more restricted supplier-specific market such as the Samsung Galaxy Store.

These stores can be a great way to get your app idea out into ‘the real world’ and it’s a definite thrill to see people actually downloading and using your mobile app. However, all these stores have got an extensive and sometimes confusing list of rules your app must stick to or it will either not be allowed on the app stores in the first place or will get withdrawn from sale at some future date. The rules vary from simple things like having the right kind of icons, text and images for the app’s page on the app store, and obvious things like correctly supporting the latest devices to slightly less obvious things like not having a separate sign-up page for any subscription services unless your also allow the users to sign up via an in-app link which goes through the app store owner’s payment methods (to ensure they get their slice of the profits).

If you know your app will be a part of the user’s daily routine, users will need to copy and paste to the clipboard, notifications will be sent, or the app will be used without internet access, then choose a desktop app. When something needs to be accessed quickly and frequently on a user’s machine, a desktop app should be preferred.

Do desktop apps have an app store?

In a word, yes, Windows has one and so do Apple and some types of Linux – although most software developers tend not to use an app store and simply allow the users to download the app directly to their desktops, usually from a web page link. The Windows app store has recently relaxed a number of their rules to make it easier for developers to sell or distribute their apps from it. Windows 11 also has a facility to support Android apps which can run on desktop computers running Windows 11. Microsoft have also introduced the Windows Subsystem for Linux or WSL. WSL allows Windows users to run, and you to develop Linux apps on a Windows 10 or 11 machine. This works in a similar fashion to running Android apps on Windows.

Are you considering cross-platform app development?

So, once you’ve established that a desktop app is the best fit for your requirements, you should then must decide which desktop platform to target. You can choose between platform-specific (native) and cross-platform programming. Platform-specific applications can only run on one platform, whether it is macOS, Windows or Linux. For the broadest reach though, Windows 10 and 11 is still by far the most widely-used desktop operating system in the World by a very significant margin.

Cross-platform development

Cross platform development which is the ability for you to create app code which is not tied to one specific target platform but can be made to work on, for example, Windows, macOS and Linux using the same code. If you require: rapid development, lower development and maintenance overheads, potentially fewer bugs due to a lower quantity of code, and the ability to launch for multiple platforms at once and attain a wider reach.

RAD Studio and Delphi support an extensive collection of development platforms. There are two key app development frameworks available for RAD Studio: the Visual Component Library (VCL) and FireMonkey FMX. Choosing to use the VCL means your app can only target Microsoft Windows (Win32/Win64) desktop or tablets running Windows such as the MS Surface.

Apps written using FMX are cross platform apps which can support Android, iOS, macOS, Windows, and Linux. Developers can build and deploy their apps from a single code base and UI using FireMonkey FMX to all of these platforms. Any differences in the ‘form factor’ of the devices – for example an iPad Pro has a might higher screen resolution and a different shape to an iPhone SE or older Android phone – can be taken care of using specialized screen layouts which are compiled into the app by RAD Studio.

If you design your screens carefully you may not need any specially customized screens – but often you will; luckily that’s very easy to do with RAD Studio.

Windows 10 Apps Development Tutorial for Beginners A laptop and a desktop computer

Is UWP deprecated?

Obviously we’re focusing on the VCL and FMX frameworks for development – but what about other technologies such as Microsoft’s UWP? Universal Windows Platform (UWP) was one of the many computing platforms released by Microsoft for the developers and was first introduced in the Windows 10 operating system. Microsoft had intended UWP to be a universal platform that was supposed to help develop apps beyond the Windows operating system. Back in 2015 the intention was that UWP would allow developers to target not only Windows desktop but also other devices such as Microsoft’s XBOX console and the HoloLens mixed reality system with little or no changes. UWP came with a number of issues and technical restrictions that caused some disagreement with prominent organizations such as Epic Games. After some capitulation by Microsoft it seems that UWP has been deprecated by Microsoft. New directions are actively being pursued by Microsoft including the .NET Multi-platform App UI or .NET MAUI system.

UWP was one of the many development solutions released which could be used to create client applications for Windows. However, for the past few years, there have been various shifts in the Windows platform from Microsoft related to application development support and platforms. The innovations introduced to provide for Android apps to run on newer versions of Windows and the superb WSL show how far Microsoft have come into embracing other operating systems and non Windows devices, even if those apps are still running on a Windows machine.

What about Microsoft Windows 10 apps development and the WinRT?

By the time Microsoft released Windows 10, they had already added a new “application binary interface” based system (ABI), the Windows Runtime, known more commonly as WinRT, which launched with Windows 8. WinRT was aimed to cater for ‘managed’ programming languages and provided support for C++, Rust, Python, JavaScript/TypeScript and of course Microsoft’s own C# and Visual Basic.

The adoption of WinRT appears to be conservative and perhaps slower than Microsoft might have liked. Developers needed to re-engineer some of their code due to the fact WinRT was written using C++ and based on an object oriented paradigm and asynchronous programming model which for some existing code bases might have been a barrier to adoption.

Fortunately, RAD Studio offers WinRT API mappings and Object Pascal interfaces to support Windows services like Win 10 Notifications and Win 10 Contracts. Developers can utilize the components we provide for a Windows application for Notifications and Contracts in both VCL and FMX C++ and Object Pascal. The underlaying mechanism for enabling the Windows apps is not a concern for developers using RAD Studio since the VCL and FireMonkey FMX take care of the details for us. You write your code, either in Delphi or C++, and manipulate the properties of visual components like edit boxes, labels, lists, trees and so on; and the non visual components like open/save dialogs and notifications and let the compiler and runtime libraries do all the hard work for you. Why try harder?

Is Delphi and the VCL a better option for Windows 10 apps development?

You have the option to program using which tool you feel suits you, of course, but we think for the greatest productivity using C++ and Delphi is a better choice. Delphi and the Visual Component Library (VCL) offer superior abilities for the encapsulation of the capabilities of the Windows operating system. Perhaps the most important reason for considering RAD Studio and Delphi is the consummate ease of learning the Delphi language the fact developers can create fully ready to use programs extremely rapidly. The “RAD” in RAD Studio is an acronym for Rapid Application Development and the drag and drop screen and form design means you do not need any wireframe type tools or even sketches to work out what you want the screens of your program to look like – you build them in RAD Studio and know exactly what they will look like when they are running.

The VCL has established a reputation among its users as one of the best possible wrappers on top of the native Windows API and UI libraries. Only the VCL library offers forward thinking support for your source code with a well-deserved reputation for stability and longevity. You can take a ‘legacy’ application built many years ago and easily maintain and update it for Windows 10 and 11, as well as provide support for earlier versions of Windows. Apps written in Delphi are very resistant to changes in the operating system as different Windows updates and patches are released. This is noticeable compared to other types of technology such as Python which can flounder when a required Python runtime is either not present or is replaced with an incompatible version. This is also true for apps written with .NET languages which can suffer when too many moving parts of the supporting .NET runtime are replaced or upgraded. There are ways around this of course, nothing is ever too horrible, but apps produced with RAD Studio really are very robust due to their lack of dependencies on runtimes and their self-contained nature which promotes great stability.

Windows 10 apps development tutorial for beginners

Ok, we’ve talked enough about the merits of using RAD Studio and a primer on whether you should be developing a Windows 10 desktop program or a mobile cross-platform app. Let’s try creating a really quick and simple app to show you how easy it is! There are plenty more in-depth tutorials and articles here on the blog site where we cover all sorts of topics from beginner to advanced.

The following steps will give you an idea of how very easy it is to construct a simple “Hello world” VCL application for Windows in a couple of minutes. In the simplest manner, we attempt to demonstrate the essential steps for creating a VCL Forms app. The application that you will create using this tutorial will include the following:

  • We will create a VCL form.
  • We will add a control to that form.
  • We will add some code which triggers when our user clicks on a button.
  • Finally. our “Hello World” app will display a dialog box when the user interacts with it.

How to create a simple “Hello world” application

Open RAD Studio and click on the “Windows VCL Application – Delphi” (or C++) item on the Welcome Page.

Windows 10 Apps Development Tutorial for Beginners Start by clicking on the new VCL application

How to create the first screen for your Windows app

You should now have a blank form on the screen. So let’s add a button control to that form.

  • Select the “Palette” tab – if you can’t find it either select View > Tool Windows > Palette or simply press CTRL + ALT + P
Windows 10 Apps Development Tutorial for Beginners The tool palette
  • The palette shows all the types of controls you can simply drop onto your application. From the palette click on the TButton entry which is in the Standard group
Windows 10 Apps Development Tutorial for Beginners Pick a button
  • You should now have a button on your form. You can click it and drag it to where you would like it to be shown.
Windows 10 Apps Development Tutorial for Beginners The example screen

How to make your first app display a “Hello world” string

  • Click once on Button1 on the form.
  • In the Object Inspector, double-click the OnClick action field on the Events tab. The Code Editor displays, with the cursor in the Button1Click event handler block.
Windows 10 Apps Development Tutorial for Beginners Adding an event
  1. For Delphi, move the cursor before the begin reserved word and then press ENTER. This creates a new line above the code block. For C++, place the cursor after the opening brace ({) and press ENTER.
  2. For Delphi, insert the cursor on the new line created, and type the following variable declaration:

For C++, enter the following code:

  1. For Delphi, insert the cursor within the code block and type the following code:

For C++, enter the following code:

Windows 10 Apps Development Tutorial for Beginners Writing the code

How to run your first “Hello world” application

  • Choose Run > Run to build and run the application. The form displays with a button called Button1.
Windows 10 Apps Development Tutorial for Beginners Running your app for the first time
  • Click Button1. A dialog box displays the message “Hello World!”
  • Close the VCL form to return to the IDE.
Windows 10 Apps Development Tutorial for Beginners The finished app running
Our first app is running

Are you ready to get started with Windows 10 apps development?

If you don’t have a copy of RAD Studio yet why not check out RAD Studio with Delphi and download it today? Give yourself the edge that RAD Studio provides to develop powerful desktop and cross- platform apps in the most efficient possible way.

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES