Skip to Content
0
Former Member
Aug 19, 2011 at 01:32 PM

A Windows form created from an addon can't be brought to front

36 Views

Hello all,

I have to use a native Windows form in my C# addon application, and I can't manage to bring it to the foreground. Whatever I do, the form is created behind the B1 window.

//To show the form, I call:
Application.Run(new SpecWin(ShowSpecFUID));
//where SpecWin is class inherited from Windows.Form
//...
//To force the form to the foreground I do this:
//in the OnShow() event of the form:
this.TopMost = true;
this.Focus();
this.BringToFront();
//but it doesn't help.

Do you have any suggestion as to how to make it work?

Thank you in advance,

Anton