[C# XNA] Disabling general keyboard input

Started by
4 comments, last by Firecore 14 years, 2 months ago
Im working on a psudo logo program that will read commands from a file and execute them line by line and my C# application is console based. Since I am using C# for this, I decided to explore XNA Game Studio 3.1 to draw the turtle and its movemets. I am learning how to make a simple xna window etc from here: http://msdn.microsoft.com/en-us/library/bb203893.aspx But, once this window is created, I cannot do any IO with the console and am forced to deal with the xna created window. At the moment my xna code does nothing but create a window. It is a copy from the Windows Game Template from Visual Studio. Is there a way to disable input from the xna window?
Advertisement
By definition XNA is not a console window.

It sounds to me more like you want the WinForms solution, with XNA rendering to a control, and then you could drop on a standard textbox and button.

It may also be possible to execute cmd.exe in another thread and reassign the standard io to that.
"It may also be possible to execute cmd.exe in another thread and reassign the standard io to that."

How would I go about doing that?
Because that would make my app look like logo with a place to draw the turtle and a text based io.
I would recommend taking a look at the WinForms samples. Don't try to force bad design to work, fix the design. [wink]

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Quote:Original post by Machaira
I would recommend taking a look at the WinForms samples. Don't try to force bad design to work, fix the design. [wink]


i see. so i took a peek at winforms and it looks interesting.
thanks :D
Just out of curiousity, why is doing what i was doing with the cmd window bad design?

This topic is closed to new replies.

Advertisement