Home » C#

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 »

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 »

Add a button to Solution Explorer toolbar

One of the extensibility features of Visual Studio is the ability to add new commands. These commands could be visible in toolbar, menu, context menu, or the toolbar of the other wondows. In this post, I’ll create a…

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 »

.NET Action, Func, Delegate, Lambda expression in PowerShell

In this post I’ll explain what is the equivalent of C# Lambda expression in PowerShell and how you can define and use lambda expressions, Func or Action in PowerShell. Lambda Expression ↔ ScriptBlock We can consider PowerShell ScriptBlock…

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 »

Customize ASP.NET MVC Model Metadata

Using ASP.NET MVC, sometimes you want to customize metadata for model. For example you want to read display name from an XML file, or you want to set some additional metadata for example for rendering. In this post,…

Read More »

Add Property to ASP.NET Identity Role

In previous post, I showed you how to add property to Identity user. Another common requirement when using ASP.NET Identity is adding new property to IdentityRole. In this post I’ll share a step by step guide which is…

Read More »