windows-style-flags

How to create a form with a border, but no title bar? (like volume control on Windows 7)

只愿长相守 提交于 2019-11-27 12:24:07
In Windows 7, the volume mixer windows has a specific style, with a thick, transparent border, but no title bar. How do i recreate that window style in a winforms window? I tried setting Text to string.Empty, and ControlBox to false, which removes the titlebar, but then the border also disappears: form.Text = string.Empty; form.ControlBox = false; form.FormBorderStyle = FormBorderStyle.SizableToolWindow; For a fixed size window, you should still use FormBorderStyle.SizableToolWindow , but you can override the form's WndProc to ignore non-client hit tests (which are used to switch to the sizing

How to create a form with a border, but no title bar? (like volume control on Windows 7)

坚强是说给别人听的谎言 提交于 2019-11-26 15:54:42
问题 In Windows 7, the volume mixer windows has a specific style, with a thick, transparent border, but no title bar. How do i recreate that window style in a winforms window? I tried setting Text to string.Empty, and ControlBox to false, which removes the titlebar, but then the border also disappears: 回答1: form.Text = string.Empty; form.ControlBox = false; form.FormBorderStyle = FormBorderStyle.SizableToolWindow; For a fixed size window, you should still use FormBorderStyle.SizableToolWindow ,