次のコードがあります。
private void MainForm_Shown(object sender, EventArgs e)
{
RepositionForm();
}
private void RepositionForm()
{
Rectangle rect = Screen.PrimaryScreen.WorkingArea;
this.Width = 100;
this.Height = 117;
this.TopMost = true;
this.Left = rect.Width - this.Width - 1;
this.Top = rect.Height - this.Height - 1;
}
Visual Studio からアプリを起動すると、フォームは正しいサイズ (100x117) で表示されます。ただし、EXE ファイルを起動してプロジェクトを起動すると、フォームのサイズは 106x127 になります。
The MinimumSize, MaximumSize and Size properties are set to 100x117.
WindowsState = Minimized
ShowIcon = False
ShowInTaskbar = False
Topmost = True
MinimizeBox - False
MaximizeBox = False
FormBorderSize = FixedDialog
ControlBox = True
アプリの起動方法にさえ違いがあるのはどうしてですか?
ありがとう