C# 24-Hour Trainer. Stephens Rod

Чтение книги онлайн.

Читать онлайн книгу C# 24-Hour Trainer - Stephens Rod страница 14

C# 24-Hour Trainer - Stephens Rod

Скачать книгу

and Denial, you'll need to make the ComboBox wider.)

      d. Use the Properties window to set the DropDownStyle property to DropDownList.

      NOTE

      The DropDownStyle value Simple makes the ComboBox display a TextBox where the user can type and a list below it where the user can make selections.

      The value DropDown makes the ComboBox display a TextBox where the user can type and a dropdown arrow that makes a dropdown list appear.

      The value DropDownList is similar to DropDown except the user can only select from the dropdown list and cannot type new values. DropDownList is often the best choice because it prevents the user from typing invalid values.

      9. Make the Buttons.

      a. Double-click the Toolbox's Button tool twice to make two Buttons with standard sizes.

      b. Drag one Button so it is a nice distance below the TextBoxes. Drag the other Button so it's aligned vertically with the first, positioning it some reasonable distance to the side (the exact distances don't matter here).

      c. Click and drag to select both Buttons. Select Format 1 Center in Form Horizontally.

      d. Use the Properties window to give the Buttons the Text values OK and Cancel.

      10. Use the Toolbox to make the result Label. (Don't worry too much about its size and position right now. Just drop it somewhere close to where it is shown in Figure 2.9.)

      ● Give the key controls names.

1. Give the key controls the names shown in Table 2.3. You don't need to give names to the other controls because the program won't need to refer to them. (Actually this example doesn't refer to the TextBoxes or ComboBox either, but a real program certainly would. A form wouldn't contain TextBoxes and ComboBoxes that it won't use.)

Table 2.3

      Конец ознакомительного фрагмента.

      Текст предоставлен ООО «ЛитРес».

      Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.

      Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.

/9j/4AAQSkZJRgABAQEAlgCWAAD/2wBDAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwOEBQRDg8TDwwMEhgSExUWFxcXDhEZGxkWGhQWFxb/2wBDAQQEBAUFBQoGBgoWDwwPFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhb/wAARCAAWAAwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZ

Скачать книгу