How to achieve this window style in WinForms?

This is a screenshot from GIMP: window headers

There is a right window title on the left and a smaller, more compact window type on the right. This is what I see from time to time in programs. How to create such a window in C #?

+4
source share
2 answers

Use the property of your Form object FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;

(also SizableToolWindow if you want the user to be able to resize the form).

+7
source

Look at the properties of the Form window in the properties. There is a property called Style or Sth, which is a drop-down menu that you can choose between regular windows, dialog and ...

UPDATE: FormBorderStyle and value

  • No No border.
  • FixedSingle Fixed single line border.
  • Fixed3D Fixed three-dimensional border.
  • FixedDialog The thick, fixed border of the dialog box.
  • Sizable Modified Border.
  • FixedToolWindow The border of the tool window that does not change. The tool window does not appear on the taskbar or in the window that appears when the user presses ALT + TAB. Although forms that indicate FixedToolWindow do not typically appear on the taskbar, you must also make sure that the ShowInTaskbar property is set to false, because its default value is true.
  • SizableToolWindow The changed border of the tool window. The tool window does not appear on the taskbar or in the window that appears when the user presses ALT + TAB.
+1
source

Source: https://habr.com/ru/post/1388589/


All Articles