You are previewing Programming Visual Basic for the Palm OS.
O'Reilly logo
Programming Visual Basic for the Palm OS

Book Description

Due to the immense popularity of Palm OS devices, demand for Palm OS applications has increased dramatically. Over 16 million Palm Powered PDAs have sold over the past six years,and the number of registered Palm Developers is currently over 100,000 and growing by about a 1,000 per month. Visual Basic is one of the most popular development platformsin the world. Until recently Visual Basic developers were not able to create applications for the Palm OS platform. By integrating into the Visual Basic environment, the AppForge Basic compiler has brought Palm development right into the main tool used by millions of VB Programmers. In fact, Visual Basic in conjunction with AppForge is fast becoming one of the favorite development environments for the Palm OS. The book provides a framework for application design, development and installation for the Palm handheld. While the reader should have experience with the property-method-event model of VB programming, no familiarity with Palm products is assumed or required. It is written primarily for corporate software developers, software architects, middle-ware developers and engineering managers who need to understand the strengths and limits of programming on the Palm, and how to integrate Visual Basic language Palm applications into their corporate IT infrastructure or product offerings. It teaches readers how to create a host of business applications including security, wireless and database connectivity programs. Some of the covered topics include:

  • Complete coverage of Palm user interface and database programming techniques

  • Data Synchronization including how to build, test and install a conduit using Visual Basic and COM

  • Web Clipping applications and how to interface those applications to Microsoft's Active Server Page framework.

  • Extending the AppForge Palm application using shared libraries and Active-X like components.

  • Programming Visual Basic for the Palm OS is the only book designed to help the Visual Basic desktop programmer to break into the Palm market. With Programming Visual Basic for the Palm OS, Visual Basic programmers can become Palm programmers almost over night.

    Table of Contents

    1. Programming Visual Basic for Palm OS
      1. Preface
        1. Who Should Read This Book
        2. Organization of This Book
          1. Part I, Programming with AppForge
            1. Chapter 1, Introducting AppForge
            2. Chapter 2, Application Development
            3. Chapter 3, Palm Database Programming
          2. Part II, Data Connectivity
            1. Chapter 4, Conduit Development
            2. Chapter 5, SQL Databases
            3. Chapter 6, Web Clipping Applications
          3. Part III, Advanced Topics
            1. Chapter 7, Operating System Access
            2. Chapter 8, Shared Libraries
            3. Chapter 9, Piedmont
            4. Chapter 10, Debugging
          4. Part IV, Appendixes
            1. Appendix A, Ingot and Enumeration Summary
            2. Appendix B, DBSLib Sample Project Setup
        3. Required Software
        4. Conventions Used in This Book
        5. How to Contact Us
        6. Acknowledgments
          1. Matthew Holmes
          2. Patrick Burton
          3. Roger Knoell
      2. I. Programming with AppForge
        1. 1. Introducing AppForge
          1. Palm Software
          2. Main Features of AppForge
            1. Ingots
              1. Basic ingots
              2. Enhanced ingots
              3. Communications ingots
              4. Multimedia ingots
            2. Libraries
            3. Utilities
          3. Installing AppForge
          4. Using AppForge
            1. Configuring the Project
            2. Compiling a Project
            3. Palm Emulator
          5. Resources
        2. 2. Application Development
          1. User Interface Design
            1. Other Important Guidelines
          2. Basic Application Layout Example
            1. Configuring, Compiling, and PRC Generation
            2. What’s an Ingot?
              1. Common ingot attributes
              2. Command Button ingot
              3. Label ingot
              4. Shape ingot
            3. Forms Management
              1. Form characteristics
              2. Displaying forms correctly
              3. Threads of execution and events
              4. Form refreshing
              5. Form scrolling
              6. Paging a large form
              7. Scrolling a large form
              8. Scrollbar (horizontal or vertical) and Slider ingots
              9. Scrolling ingots on a normal-sized form
              10. Control layering
              11. Icons and title for Palm applications
            4. The Basic Application Layout Example, Continued
              1. Form menus
              2. Graphic ingot
              3. AppForge color support
              4. Textbox ingot
          3. Language and Libraries Support
            1. Visual Basic Language Support
              1. Object support
              2. Limitations of ingots
              3. Unsupported types and limitations
              4. Arrays
              5. Intrinsic user interaction
              6. Error handling
              7. Events
              8. Miscellaneous
            2. AppForge Library Support
              1. Numeric and System libraries
              2. Extended Functions library
                1. Text editing and sizing
                2. Capturing user and device actions
                3. Data transfer
                4. Preferences management
                5. Device status
              3. Palm OS Extensibility library
              4. PDB library
            3. Friction Loss Calculator Example
              1. CheckBox ingot
              2. ComboBox ingot
            4. Cut, Copy, Paste Example
            5. Alarm Clock Example
              1. Timer ingot
              2. Tone ingot
            6. Virtual Menu Example
              1. INetHTTP ingot
              2. Filmstrip ingot
              3. Graphic Button ingot
            7. Signature Collector Example
              1. The Signature ingot
            8. Specialized Ingots
              1. Movie ingot
              2. Serial ingot
              3. ClientSocket ingot
              4. Scanner ingot
        3. 3. Palm Database Programming
          1. The Palm Database
            1. Database Header Block
            2. Application and Sort Info Blocks
          2. AppForge PDB Library
            1. Database Management
              1. Schemas
              2. Closing and deleting databases
              3. The PDBOpen method
              4. Database attributes
            2. Record Management
              1. Creating records
              2. Reading and editing records
              3. Deleting records
              4. Categories
              5. Attributes
            3. Navigation
              1. Searching
              2. Sorting
            4. Other Database Topics
              1. Errors
              2. Counting
              3. Unique numbers
          3. The AppForge Database Converter
            1. Inventory Tracking Application
              1. Grid ingot
              2. Application structure
              3. Categories
              4. Type-ahead search
              5. Suppliers
          4. Resources
      3. II. Data Connectivity
        1. 4. Conduit Development
          1. Applications and Conduits
            1. Conduit Types
            2. Mirror Synchronization
            3. Categories
            4. Other Types of Conduits
          2. Conduit Design
            1. When Not to Use a Conduit
          3. Installing the CDK
          4. Nuts and Bolts
            1. Sample Application and Conduit
            2. Configure the VB Conduit Project
            3. Support IPDClientNotify
            4. GetConduitInfo
            5. CfgConduit
            6. SyncForm
            7. ConfigureConduit
            8. BeginProcess
          5. Synchronization Logic
            1. HHtoPC
            2. FastSync
            3. Other Sync Types
            4. Running the Conduit
          6. Data Formats
            1. Creating Packed Record Data
            2. Reading Packed Record Data
            3. Converting Dates and Times
          7. Resources
        2. 5. SQL Databases
          1. SQL Publishing
            1. Internet Phone Database
            2. ISPQuery Program
            3. PDB Generation
            4. Palm Display Application
          2. Universal Conduit
            1. Sales Database
            2. Palm Sales Application
            3. Configuring the UC
              1. Synchronization type
              2. PDB and VB module
              3. HotSync manager
            4. Sales Application: Products
              1. Products table synchronization
            5. Design Issues
              1. Minimize on-device data
              2. Primary key generation
              3. Database foreign key relationships
              4. UC data types
              5. Replication conflicts
              6. NULL fields
              7. Deleted records
            6. Sales Application: Orders
          3. Resources
        3. 6. Web Clipping Applications
          1. Palm.Net Wireless Architecture
            1. Palm Proxy Server
            2. Wireless Security on Palm.Net
          2. Simple WCA Tour
          3. Building a Large Application
            1. User Interface Limitations and Extensions
            2. Application Partitioning
            3. Security and Access Control
            4. Ch6b Details
          4. Palm OS 4.0
            1. Database Download
            2. Additional Metatags and Keywords
          5. Resources
      4. III. Advanced Topics
        1. 7. Operating System Access
          1. Fuser Mechanics
            1. CallApp Interface
            2. Data Access
            3. Launch Codes and Parameters
            4. A Simple Fuser
          2. A Data Encryption Program
            1. DES
            2. Driver Application
            3. VB Encryption Module
              1. Fuser interface
              2. Initialization
              3. Key generation
              4. Encryption and decryption functions
            4. C/C++ Encryption Fuser
              1. Feature memory
              2. The DoDES function
              3. The DES_Encrypt function
              4. The DES_Decrypt function
          3. Resources
        2. 8. Shared Libraries
          1. Memory Concepts
          2. Memory Management Functions
          3. DBSLib Shared Library
            1. CodeWarrior Setup
            2. Global Memory Management
              1. CreateGlobalMem
              2. FreeGlobalMem
              3. LockGlobalMem
              4. UnlockGlobalMem
              5. IsDBSLibOpen
            3. Client Memory Management
              1. CreateClientMem
              2. FreeClientMem
              3. LockClientMem
              4. UnlockClientMem
            4. Required Functions
              1. __Startup__ function
              2. DBSLibOpen (Open) function
              3. DBSLibClose (Close) function
              4. DBSLibSleep (Sleep) and DBSLibWake (Wake) functions
            5. Custom Library Functions
              1. Data types and constants
              2. DBSLibGetAPIVersion
              3. DBSLibParseSchema
              4. DBSLibGetDBInfo
            6. Internal Library Functions
              1. ParseDBAttributes
              2. ParseFields
              3. ParseRecData
              4. CreateSchema
              5. FreeFieldElemArrayData and FreeFieldElemArray
              6. CountItems
              7. ExtractData
            7. Dispatch Table
              1. Traps and custom function declarations
              2. Dispatch table implementation
              3. Dispatch table assignment
          4. DBSLib Driver Application
            1. Load and Open
            2. Use
            3. Close and Unload
          5. DBSLib Fuser
            1. Data Types
            2. Implementation
          6. AppForge Driver Application
            1. Fuser Data Types
            2. Database Types
            3. Implementation
              1. GetAPI
              2. CreateDB
              3. ViewData
        3. 9. Piedmont
          1. Obtaining Piedmont
          2. Architecture Overview
          3. Module and Interface Definition
            1. Module Declaration
            2. Interface Declaration
              1. Conformant interfaces
            3. Event Interface Declaration
            4. Class Declaration
            5. File Details
              1. Module definition file
              2. Interface definition file
              3. Event interface definition file
          4. Component Code Generation
            1. TagParse.h
            2. CTagParse.h and CTagParse.cpp
            3. _CTagParse.inc
            4. _MTagParse.inc
            5. MTagParse_module.h and MTagParse_module.cpp
            6. MTagParse_GUID.h
            7. TagParse_tlb.idl
            8. TagParse.def
          5. Windows Component Implementation
            1. Smart Pointer
            2. Debugging
            3. CTagParse Methods
              1. IEventSource
              2. VerifyTags
              3. ExtractDataByIndex
              4. ExtractDataByTag
              5. CountTagPairs
          6. Palm Component Implementation
          7. AppForge VM Integration
        4. 10. Debugging
          1. Conditional Compilation
          2. Palm Reporter
          3. Palm Buttons
          4. Debug Database
      5. IV. Appendixes
        1. A. Ingot and Enumeration Summary
          1. Basic Ingot Components
            1. Command Button Ingot
            2. CheckBox Ingot
            3. ComboBox Ingot
            4. Label Ingot
            5. ListBox Ingot
            6. Radio Button Ingot
            7. Shape Ingot
            8. TextBox Ingot
            9. Timer Ingot
            10. AppForge Form
          2. Enhanced Ingots
            1. Graphic Ingot
            2. Graphic Button Ingot
            3. Grid Ingot
            4. Horizontal Scroll Ingot
            5. Slider Ingot
            6. Vertical Scroll Ingot
          3. Multimedia Ingots
            1. Movie Ingot
            2. FilmStrip Ingot
            3. Tone Ingot
          4. Data Communication Ingots
            1. Signature Capture Ingot
            2. ClientSocket Ingot
            3. INetHTTP Ingot
            4. Serial Ingot
            5. Scanner Ingot
          5. AFTone Ingot Pitch values
          6. Database Error Codes
            1. Palm OS system preference settings
        2. B. DBSLib Sample Project Setup
          1. Target Settings
          2. Access Paths
          3. 68K Target
          4. C/C++, Processor, and Global Optimizations Settings
          5. PalmRez Post Linker
          6. Configuring and Adding Files
      6. Index
      7. Colophon