Application Development Using Visual Basic® and .NET
by Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Text and Fonts
In a GUI environment such as Windows, displaying text is just another kind of graphical operation. In place of using pens and brushes as our drawing tool, we use fonts. Fonts are quite complicated and beyond the scope of this chapter to discuss in any detail. In fact, drawing with text using GDI+ is quite complicated, and normally you won't need to do that unless you are writing a rather specialized application such as a word processor. Normally, you will work with text data using the rich array of Windows controls.
We illustrate the fundamentals of working with text and fonts with the TextDemo program, which also demonstrates handling a KeyPress event for entering a character. The program allows you to type text, which is displayed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access