I am making my program multi-threaded because it is a server manager for Bukkit (Minecraft) which is pretty heavy for some systems. Now I am facing a little problem. When I want to open a new child form I can't tell it to centerparent. It just doesn't do what I tell the form to do. I have found a workaround for this but I don't know if it can be done more easy or if I have to change something else.
This is the code I have atm:
Works
private void ThreadFrmSettings()
{
Form frmSettings = new frmSettings();
frmSettings.StartPosition = FormStartPosition.Manual;
frmSettings.Location = new Point(Location.X + (Width - frmSettings.Width) / 2, Location.Y + (Height - frmSettings.Height) / 2);
frmSettings.ShowDialog();
}
Doesnt work
var frmSettings = new frmSettings();
frmSettings.ShowDialog();
Is this behavior normal? Thanks!