J
jp2msft
I want to plant an Easter Egg in our software.
We have a TextBox that is multiline and used to display all sorts of
messages on the screen for our operators based on database queries and such.
The Easter Egg I want to create would send a dump of the data for a
particular part number to the screen when a certain secret combination of
characters is pressed. If it works out well, I can actually impliment it on
our production floor.
I can read in the data and split it up in the fields it needs to be in, but
the TextBox's font is Arial, and not very good at displaying tablular data.
If I change the font to something fixed like Courier, the change will be
very obvious.
Does anyone know of a technique that I could use to make sure each field
that I want to display in the MultiLine TextBox only takes up set amount of
space?
SubString came to mind at first, but padding a field with spaces would not
get my next field to the correct position.
Tabs seem nice, but how can I tell exactly how much space a vbTab is going
to consume? What if text runs over?
We have a TextBox that is multiline and used to display all sorts of
messages on the screen for our operators based on database queries and such.
The Easter Egg I want to create would send a dump of the data for a
particular part number to the screen when a certain secret combination of
characters is pressed. If it works out well, I can actually impliment it on
our production floor.
I can read in the data and split it up in the fields it needs to be in, but
the TextBox's font is Arial, and not very good at displaying tablular data.
If I change the font to something fixed like Courier, the change will be
very obvious.
Does anyone know of a technique that I could use to make sure each field
that I want to display in the MultiLine TextBox only takes up set amount of
space?
SubString came to mind at first, but padding a field with spaces would not
get my next field to the correct position.
Tabs seem nice, but how can I tell exactly how much space a vbTab is going
to consume? What if text runs over?