My first Microsoft Form App in C#
Step-by-step guide how to make your first desktop app in C#

Search for a command to run...
Step-by-step guide how to make your first desktop app in C#

I've been wanting to dive into some .Net. This tutorial seems like a good place to start, so thanks! I'm used to C# in Unity but I've never done something like this before.
Hey 👋, I'm back with a new blog post after a long break! This past week, I’ve been diving deep into integrating push notifications into a mobile app. If you've ever wondered how they work and why they’re so effective, this post is for you! What Are ...

I'm back again with a new blog post. The idea for this post came very spontaneously. I'm currently investing a lot of time in my new development project, and I came up with how to further secure the application. As a solution to this issue, quite a f...

Node.js is an engine that allows us to run JavaScript outside the browser. Many applications today are powered by Node.js, offering numerous advantages and a few drawbacks. However, my intention today is not to introduce Node.js or JavaScript. Today,...

I have said many times that computer science is a huge field in which everyone can find themselves. Being a computer science student has its advantages and benefits, and one such advantage is what GitHub offers with its GitHub for Education program a...

Open Graph is an Internet protocol created by Facebook to standardize the display of metadata on social networks. What advantages does it bring? Open Graph brings advantages when displaying a website on social networks. Open Graph makes our posts mor...

Within the .Net Framework, there is a library called Windows Forms. The Windows Forms library allows us to create graphical desktop apps using the C# programming language. Another name for this library is WinForms.
Applications created with the WinForms library are called Windows Forms Applications and only run on Windows.
Prerequisites:
When we start Visual Studio 2019, a window with four options appears. We select the option "Create a new project".

In the following, we will have to choose what kind of application we want to create. In our case, when we want to create a Windows Forms App, we look for the Windows Forms App (.NET Framework). Continue by pressing the "Next" button.

In the Configure your new project window, fill in the required information, name our project, select where the project will be saved ... Continue by pressing the "Create" button.

After creating a new project, you should see a window like the one below.

We will create a simple application that will allow us to convert a number to Roman.
We start creating our application by customizing the user interface. We do this by clicking on the window of our application.
In the Properties part of the window, we can change the look of our application. We can change the app name and icon in the corner, the color scheme of the application ...

The following is the addition of the widgets of our application.
Widgets used:
The widgets can be found in the upper left corner. Add widgets to our window by dragging it from the Toolbox to the Main window.

After inserting the widgets, our program looks something like this in the end. I recommend that we change the name of all the elements so that we know what each element represents.

Now, we can add some functions to our app. This is done by double-clicking the button. A new window will open in which you can enter the code.
The final code is like the following.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RomainConverter
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string ToRoman(int number)
{
if ((number < 0) || (number > 3999)) return "Value must be between 1 and 3999";
if (number < 1) return string.Empty;
if (number >= 1000) return "M" + ToRoman(number - 1000);
if (number >= 900) return "CM" + ToRoman(number - 900);
if (number >= 500) return "D" + ToRoman(number - 500);
if (number >= 400) return "CD" + ToRoman(number - 400);
if (number >= 100) return "C" + ToRoman(number - 100);
if (number >= 90) return "XC" + ToRoman(number - 90);
if (number >= 50) return "L" + ToRoman(number - 50);
if (number >= 40) return "XL" + ToRoman(number - 40);
if (number >= 10) return "X" + ToRoman(number - 10);
if (number >= 9) return "IX" + ToRoman(number - 9);
if (number >= 5) return "V" + ToRoman(number - 5);
if (number >= 4) return "IV" + ToRoman(number - 4);
if (number >= 1) return "I" + ToRoman(number - 1);
throw new ArgumentOutOfRangeException("Value must be between 1 and 3999");
}
private void ConvertButton_Click(object sender, EventArgs e)
{
var isNumeric = int.TryParse(InputNumber.Text, out int n);
Result.Text = ToRoman(n);
}
}
}
Now we can test our app how it works. This is done by pressing the "Start" button in the top taskbar.

After clicking, a new window will open in which we can test our application.

I hope the post helped you. For even more content, you can follow me on my Twitter.