Не лгите.
Там — не одна строка:
читать дальше »
Цитата:
Examples
The following code example uses the ControlBox, FormBorderStyle, MaximizeBox, MinimizeBox, and StartPosition properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example requires that the example's method is defined in a form class and called when the form is being initialized.
Код:
public void CreateMyBorderlessWindow()
{
this.FormBorderStyle = FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.StartPosition = FormStartPosition.CenterScreen;
// Remove the control box so the form will only display client area.
this.ControlBox = false;
}
|
У меня нет VS, потому я не могу проверить, как сие, при визуальном проектировании формы в дизайнере, будет работать в C#. Потому я и просил привести Вас полученный Вами код.
При
ручном создании формы, например — в PoSH, хватает и задания одного только свойства ControlBox:
↧ PowerShell ↧
Код:
function ShowMainWindow {
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void][Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$oForm = New-Object Windows.Forms.Form
$oForm.ClientSize = New-Object Drawing.Size(320, 200)
$oForm.ControlBox = $False
$oForm.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen
[void]$oForm.ShowDialog()
}
ShowMainWindow
Имелся в виду вот этот пост.
Цитата LilLoco:
…нужно убрать заголовок формы
Код:
this.Text = string.Empty;
»
|
Проверил в PoSH — оно. Очевидно, достаточно просто
не задавать заголовок
.