The nStyle parameter of the Show method cannot be changed while a form is visible.
-
You are calling a form's Show method with a parameter while the form is visible.
Change the modality of the form while it is not visible by using code similar to the following:
В Copy Code Form1.Hide Form1.Show(nStyle)