O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.7. A Simple Text Editor

Now let’s see how to write a simple text editor in just a few minutes, using the functionality we have discussed in this chapter so far.

First we create a Windows application and add some controls to the form. As Figure 5.19 shows, we add two label controls and set their Text properties to Available Fonts and Size, respectively. Then we add a combo box, a NumericUpDown control, and two button controls with the Text properties set to Color and Apply, respectively. We will use the combo box control to display all installed fonts, the NumericUpDown control to set the size of text, and the Color button to set the text color. We also add a RichTextBox control to the form and size it appropriately.

Figure 5.19. A simple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required