Roman Ratskey
Roman Ratskey

Reputation: 5269

Using Multiple Forms

Well i am creating a program in which i need a separate window to show the log.

I managed to show another form using

form1.ShowDialog();

But unfortunately this transfers the focus to the shown form and the user is not able to click on the previous form until he\she closes it.

Question : How could i use 2 separate forms at the same time ( one for the main ui, and one for the logger ).

Upvotes: 3

Views: 90

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564861

You would use form1.Show() instead of ShowDialog().

The ShowDialog method is intended to show the form as a modal dialog, which (by design) will block the original form until form1 has been closed.

The Show method, on the other hand, just opens the new form as a normal Window.

Upvotes: 5

Related Questions