The non-client area of Windows Forms are displayed using Windows' system settings that apply to
all "standard" Windows.
Customizing the visual appearance of Form non-client areas, like the TitleBar, in C#, involves using low-level System facilities through API calls. It is complex.
Fortunately, there's a useful open-source library that will let you get these effects easily: [
^].
If you really want to
learn how to do this
yourself, in addition to studying the source code of this library, you can read the three tutorials on the author of the library's blog: [
^], [
^], [
^].