Displaying Multicolored text in a control



Hello folks. I'm writing a Roguelike game in C#. Fun stuff. The game
includes a map that is made entirely of colored ASCII art in a
monospace font. I would like to make this map a control in the main
form.

My first attempt was with RichTextBox. I wanted to set the background
to black. After cruising newsgroups I determined that wasn't possible.

My second attempt involves an AxSHDocVw.AxWebBrowser control. I got
this by adding the "Microsoft Web Browser" control to my Toolbox. This
control does not play nicely with the rest of my form! It constantly
steals focus for itself, and there isn't a reliable mechanism for
forcing my main form to have focus. Since that control is not set up
to handle keyboard events (this is how the player moves through the
map) other people on newsgroups have been told to write an unmanaged
DLL that snags a (global?) hook and signals my application when
keyboard input has been entered.

That seems awfully complicated. A wise software engineer once told me
when a solution seems inordinately complex that I should ask if there's
a better solution. So that's the purpose of my message. :) I want to
display multicolored text in a form control. I want to be able to
change the background as well as the foreground, and I want to be able
to acquire keyboard input without writing a bunch of low level code.
What is the best solution? What is the best control to use? I am
using .NET 1.0.

Thanks!

.



Relevant Pages

  • Re: Gareee, Poser, Im Confused!!! Help!
    ... I have to say though, I "did" end up spending most of my evening playing with Poser, ... to where I'm actually in control and know what I'm doing and get the results I want. ... or are you saying Layout will create the UV map for me somehow? ... Ya know, like with Vue, when you register, you also are creating an account and from there you can see if you need anything. ...
    (comp.graphics.apps.lightwave)
  • Stephen Lebans PictureBox Class - Transparent option?
    ... I needed a run-time-manipulable image control on an Access form. ... were found on a map. ... A drawn map between 1 and 2 showing only rivers and some geographic ... I would like the white part to be transparent, that is, only display the ...
    (microsoft.public.access.forms)
  • Re: RPG
    ... I am currently planning to write a little role playing game using DirectX, ... In a common RPG, you see the map from above, flying over the map as you ... with the mouse moving near the edges of the screen, and to control the ...
    (comp.games.development.programming.misc)
  • excel loses functionality when a Map Point Active X Control is accessed through VBA
    ... Map Point programing, there is almost nothing about useing them ... Basically I have a map point control embedded into excel. ...
    (microsoft.public.excel.programming)
  • Re: non-modal file save dialog
    ... Only because I do not know how to have Tcl tell me ... As the vehicle containing the application travels, this map is kept ... > fixed synchronous processing that occasionally processes events, ... > main control just be a wish script that does package require MyCoolStuff. ...
    (comp.lang.tcl)