1
DotNet / SFML window blocking windows form
« on: September 17, 2012, 08:39:02 pm »
Hi,
So as seen in this thread: http://en.sfml-dev.org/forums/index.php?topic=9141.0 I am using SFML2.0 .NET within windows forms.
What I have is a windows forms application with a picturebox in it that I use as the container for my SFML window.
A problem I have run into is that when I create a child form within the mainform, even if I set it as the topmost window, the sfml renderwindow will always block it.
Is there a way to make it so the new form will display on top of the render window?
Here is a small snippet of code I have:
SFMLWindow = new RenderWindow(this.pictureBox1.Handle);
form2 = new Form2();
form2.MdiParent = this;
form2.TopMost = true;
form2.Show();
This will show:
The only way I have been able to see the child form is if I hide the sfml window
This will show:
I have also tried the form2.BringToFront() method, which also does not work.
So as seen in this thread: http://en.sfml-dev.org/forums/index.php?topic=9141.0 I am using SFML2.0 .NET within windows forms.
What I have is a windows forms application with a picturebox in it that I use as the container for my SFML window.
A problem I have run into is that when I create a child form within the mainform, even if I set it as the topmost window, the sfml renderwindow will always block it.
Is there a way to make it so the new form will display on top of the render window?
Here is a small snippet of code I have:
SFMLWindow = new RenderWindow(this.pictureBox1.Handle);
form2 = new Form2();
form2.MdiParent = this;
form2.TopMost = true;
form2.Show();
This will show:
The only way I have been able to see the child form is if I hide the sfml window
SFMLWindow = new RenderWindow(this.pictureBox1.Handle);
form2 = new Form2();
form2.MdiParent = this;
form2.TopMost = true;
form2.Show();
SFMLWindow.SetVisible(false);
form2 = new Form2();
form2.MdiParent = this;
form2.TopMost = true;
form2.Show();
SFMLWindow.SetVisible(false);
This will show:
I have also tried the form2.BringToFront() method, which also does not work.