c# - XNA: My richtextbox is invisible when fullscreen is toggled -
i have added richtextbox in xna invisible when fullscreen toggled
this code:
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); }
the code above working fine if graphics.isfullscren set false
when set direct x run full screen, form no longer visible. when form not visible, controls not visible.
you better of implementing own ui textbox. bit of work, not bad may seem...
Comments
Post a Comment