Page 169 - DCAP408_WEB_PROGRAMMING
P. 169

Unit 10: Menus




          PRIVATE  SUB  mnublu_CLICK  (  )                                                      Notes
          form1.BACKCOLOR    =    VBBLUE
          END  SUB

          PRIVATE  SUB  mnugre_CLICK  (  )
          form1.BACKCOLOR    =    VBGREEN
          END  SUB
          Coding for the menus is the same as coding for command buttons — coding for the ‘click’ event.
          Now run the project and test the menus by clicking on them. We will see the backcolor changing
          as we click on the menus.

          Self Assessment

          Fill in the blanks:

          1.   ......................... tool helps us to effortlessly create a menu interface for our applications,
               that too in no time.
          2.   Index is required if we are creating a menu .........................

          3.   The ‘Enabled’ and ‘Visible’ checkboxes are ‘.........................’ by default, which means that
               the menu will be both visible and enabled at the time of creation.
          4.   Coding for the menus is the same as coding for ......................... buttons.

          5.   ‘Caption’ and ‘Name’ mean the same as we know; ‘Caption’ is the visible portion, ‘Name’
               is for ......................... of the application.
          6.   The ‘.........................’ option gives us a drop-down list for assigning shortcut keys to our
               menus.

          10.2 Menu defined as Resource Data

          "A resource is any non-executable data that is logically deployed with an application."
          The easiest way to manage resource files in your project is to selecting the resources tab in the
          project properties. You can bring this up by double-clicking My Project in Solution Explorer or
          your project Properties under the Project menu item.
          The resource types that are supported in the Resource Editor are:
              Strings
              Images (PNG, BMP, GIF, JPEG, and TIFF are supported!)

              Icons
              Audio
              Files
              Other

          Using resource files adds another advantage: better globalization. (Microsoft has clearly heard
          the jingling clink of rupees, lira, yen, and krona in .NET.) Resources are normally included into
          your main assembly, but .NET also lets you package resources into satellite assemblies. This lets
          you  accomplish better globalization because you can include just those satellite assemblies




                                           LOVELY PROFESSIONAL UNIVERSITY                                   163
   164   165   166   167   168   169   170   171   172   173   174