I\'ve created a test within a Unit Test Project, in which I want pop up a Form using its ShowDialog()
function:
[TestMethod]
public void Te
In my case, using VS2017, setting the property ShowInTaskbar
as false
did the trick.
This is the complete code used to show the dialog:
form.TopMost = true;
form.StartPosition = FormStartPosition.CenterScreen;
form.ShowInTaskbar = false;
form.ShowDialog();
P.S. After finding this, I've seen the same solution in Displaying Windows Forms inside unit test methods