Setting Form.BorderStyle might trigger recreating the window.
I don't know what Form.CreateParams do (I'm not too experienced in this kind of programming), but if this is some procedure which is called inside process of creating the window, then you shouldn't set border style there, as it will lead to calling the same procedure (and recreating the window) endlessly.