我在 XNA 中添加了一个丰富的文本框,但是在切换全屏时它是不可见的
这是我的代码:
RichTextBox richTextBox1 = new RichTextBox();
public Engine()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
this.IsMouseVisible = false;
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.IsFullScreen = true;
}
protected override void Initialize()
{
richTextBox1.Location = new System.Drawing.Point(100, 100);
richTextBox1.Name = "richTextBox1";
richTextBox1.Size = new System.Drawing.Size(100, 100);
richTextBox1.TabIndex = 0;
richTextBox1.Text = "";
Control.FromHandle(Window.Handle).Controls.Add(richTextBox1);
}
如果 graphics.IsFullScren 设置为 false,上面的代码工作正常