Chapter 4. Working with Menu Controls for Pocket PC

Team-Fly    

  
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications
By Chris Tacke, Timothy Bassett
Table of Contents


IN THIS CHAPTER

  • Setting Project References For MenuBar Control

  • Creating Menu Bars

  • Implementing Menu Buttons

  • Adding the New Button

The Pocket PC menu is implemented via an ActiveX control distributed with the Pocket PC SDK. Unlike Visual Basic, eMbedded Visual Basic has no native menu functionality. Another disadvantage is that there is no visual designer for this menu control. All design for the menu must be completed at runtime via programmatic control. One advantage to this is that it forces you as the programmer to have full control over the menu at all times. Toward the end of this chapter, we will investigate a dynamic menu system that's another design that lends itself to the limited menu support of eVB.

The menu control has a few events and a collection of objects. These collections are a multilevel hierarchical representation of the menu bars currently present on the menu.

The Pocket PC menu has a distinctly different appearance than Visual Basic menu controls. The two major differences are no cascading menus and buttons. Buttons are placed on the top-level menu bar itself. Cascading menus would be difficult to control and implement in such a small amount of real estate. Users would also be hard-pressed to get three perfectly placed stylus taps onto the menu. If a cascading menu is desired, use a menu with an ellipsis () and a small form to choose the next option. Buttons placed directly on the menu bar are a quick substitute toolbars. There really is no room for a docking toolbar (except in certain applications such as Pocket Excel and Pocket Word, but I still have difficulties working with the small amount of space left over after I turn on all the toolbars in these applications).

With all that in mind, in this chapter you will:

  • Create a project reference to component for menu control

  • Add a menu control to form

  • Populate menu options

  • Use graphics on menus

  • Learn how to respond to menu events

  • Investigate implementing a dynamic menu

  • See how to implement a New menu button


Team-Fly    
Top
 


eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net