how to use Guide class in Xen?

Aug 19, 2009 at 1:21 PM


I wanted to using Guide class for Text input box.

then, I tested to use Guide.BeginShowMessageBox.


here is my source( I edited Tutorial 1) --------------------------------------------------------------------

 public class Tutorial : Application
  private DrawTargetScreen drawToScreen;
        bool flag;

  protected override void Initialise()
   Camera3D camera = new Camera3D();
   drawToScreen = new DrawTargetScreen(this, camera);
   drawToScreen.ClearBuffer.ClearColour = Color.CornflowerBlue;

            this.XnaComponents.Add(new GamerServicesComponent(this));

  protected override void Update(UpdateState state)
   if (state.PlayerInput[PlayerIndex.One].InputState.Buttons.Back.OnPressed)
            if (state.KeyboardState.KeyState.A.IsDown == true && flag == false)
                string[] strings = { "aa" };
                Guide.BeginShowMessageBox("Title", "Test", strings, 0, MessageBoxIcon.None, delegate(IAsyncResult result) { string aa = "aa"; }, null);
                flag = true;

  protected override void Draw(DrawState state)



But it didn't work, Neither Guide.BeginShowKeyboardInput.

Screen display, but does not respond to input. I tried to same source in XNA, It's works.
How to use Guide Class in Xen?
Aug 20, 2009 at 10:28 PM

If I were you, I wouldn't use GamerServicesComponent rather GamerServicesDispatcher which is better for Xen as it doesn't really follow the Xna Framework Game Components system.

You can find a useful link in the MSDN library:


Aug 20, 2009 at 11:42 PM

Thanks!  It was very helpful.