Custom form design style

I have always believed that the borders of forms that use programs such as iTunes or Visual Studio 2012 are executed without a border style and buttons, because the close button is drawn as images.

Visual studio 2012Musicjet

However, as soon as my Visual Studio did not respond, and the border changed to the main Windows border.

Windows

How can I get my own form border? Is this possible in C #?

+6
source share
2 answers

You see the ghost window, a window created by the Windows window manager to replace a dead window. You see "Do Not Respond" in the title bar. Of course, this window will not have the same style, but Windows does not know how to do this.

You can use the Spy ++ utility to view the window properties of another application. VS2012 really uses the usual window style with a title bar. How they are set up is a well-kept secret, I suspect that they intercept WM_NCPAINT, a rather complicated message to realize themselves. Using a borderless window is definitely easier.

+3
source

In addition to the @Hans post:

Using WPF, you can set the windowstyle style to this:

<Window WindowStyle="None"> 

Then you can implement your own buttons.

0
source

All Articles