AppForge VM Integration

In this section, we integrate the TagParse component into an AppForge project in Visual Basic. We write a simple driver application in Visual Basic and then install it on the Palm.

Create a new AppForge project for the Palm called AFVBClient in the AFVBClient directory (see Figure 9-1, earlier in the chapter). Name the form frmTagParse and add three AFButton controls with the properties from Table 9-10. Figure 9-7 shows how the form should look.

AFVBClient form

Figure 9-7. AFVBClient form

Table 9-10. AFButton control properties

Name

Caption

btnCountSchema

Count schema

btnCountRecs

Count records

btnExtractData

Extract data

Add a reference for the TagParse to the AFVBClient project. Select Project References from the main menu and browse to the TagParse_tlb.tlb type library in the ParseServer\Debug directory. The MTagParseLib module reference should now appear as shown in Figure 9-8. Click OK to close this window.

AFVBClient project references

Figure 9-8. AFVBClient project references

Start the form by adding the following initialization code to frmTagParse.

Option Explicit

Dim WithEvents tagParse As CTagParse

In declaring the tagParse variable, we use the WithEvents keyword to indicate that we want to sink events from it.

Next, declare the two event sink methods.

'sink invalid tag pair event ...

Get Programming Visual Basic for the Palm OS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.