Setting focus after showing a new form works great. My taskbar does not flicker.
private void button1_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.TopMost = true; f2.Show(); this.Focus(); }
May I ask why you want to set the focus to the main shape, because by default the new shape will be drawn on top of the main window and you will need to close or move the new shape to view the main shape of the window.
source share