Tag: Windows Forms

Put application in startup

In this post I’ll show how you can put your application in Windows Startup using C#. One of the solutions to put yout application in Windows Startup is putting shortcut of your application in the startup folder of…

Read More »

Panel titlebar – Customize nonclient area

In this example I’ve added a titlebar to the panel by extending the nonclient area of the panel and painting on the nonclient area. It basically means the titlebart is not part of the client rectangle and it…

Read More »

Panel border size and border color – Customize nonclient area

In this post, I’ll show you how you can customize the panel border size and border color by customizing the nonclient area of the panel. The following picture shows panels with different border color and border size: When…

Read More »

A Generic Type TypeConverter – Property Editor to pick a type

To push the property grid to show a dropdown for a property, usually the best way is creating a TypeConverter for the prioperty. It basically Provides a unified way of converting types of values to other types, as…

Read More »

Windows Forms HelpProvider – Add Unicode Support

The built-in HelpProvider component of windows forms is suffering from an old problem; it’s unable to show unicode characters (for example Persian language). Even if you try to show a help popup using Help.ShowPopup, when you a specify…

Read More »

DataAnnotations Attributes in Windows Forms

In a previous post, I showed how you can extend Windows Forms to use DataAnnotation Validation Attributes; Here in this post I am going to show how you can control DataGridView column name, column order, visibility, tooltip, control type, and format using DataAnnotation Attributes.

Read More »

Use COM type libraries in .NET CORE Windows Forms Project

In this post I’ll show how you can use COM type libraries in a .NET Core Windows Forms project. Sometimes you need to add a reference to a COM type library, for example, let’s say you want to…

Read More »

Print RDLC Report without Preview

Sometimes you have a report which you want to print without showing a preview in ReportViewer. You can print an RDLC report programmatically using LocalReport object and CreateStreamCallback callback function. There is an article in MSDN which describes…

Read More »

How to edit a List<string> in PropertyGrid

When you define a property of List<string> type for a control, if you try to edit the property in PropertyGrid, a collection editor form will open and if you click on add button on the editor form, you…

Read More »

How to add item to Windows shell context menu to open your application

Sometimes when installing applications, you want to add an entry to the windows shell context menu to open your application and pass the selected file or folder name to your application. In this post I’ll show how to…

Read More »