I have problem with minimizing by program. It has main form and others, which I open by ShowDialog()
Problem is with minimizing these dialog forms. When my friend on Windows7 minimize this dialog, it minimize dialog and main form (dialog isn’t in taskbar, I disabled it), but on my Windows7 only dialog is minimized like this

Is here any chance to minimize both forms? I found, that after form is minimized, Resize event is fired, so I made this
private void ShowCode_Resize(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
main.WindowState = FormWindowState.Minimized;
}
}
but when I click on form in taskbar, main form is showed and dialog is closed, I don’t know why?
Is here any chance, to always minimize it to taskbar?
And why on my PC it works this way, and on friend’s other way? I don’t know that I changed something in Windows settings.
If I understand you correctly – I found a solution after asking a similar question.
Simply add a:
Show();At the end of Form2’s event-handler.
See about it here (and in the other answers.)