3.9 Using Visual Basic.exe

IMPORTANT: Use these procedures only if you chose to have the wizard create a Visual Basic project (.VBP) file. That is, you answered Yes in Step 4 of Completing the C3PO.

(If you answered No, Click here for Using Visual Basic .dll.)

This section includes:

3.9.1 New Files

Your new C3PO consists of the following files, which are located in the directory you specified in Step 1 of Starting the Wizard.










3.9.2 Creating an .EXE File

Now that you have created a C3PO for Visual Basic, you need to perform the following steps to make your C3PO work for you. Unless otherwise specified, all files you create using these procedures should be placed in the same directory as the new C3PO files listed above.

  1. Start Visual Basic.

  2. Load your new C3PO project (XXX.VBP).

  3. To enable breakpoints, go to the Project>Properties>Component tab and change the start mode from "Standalone" to "Active X Component."

  4. Create an executable file (File Make).

3.9.3 Registering Your C3PO

  1. Switch to your Windows desktop.

  2. Register the C3PO with GroupWise and Windows by running it from Windows (Start Run) using the syntax: XXXC3PO.EXE /R

    • XXXC3PO represents the unique name of your C3PO.

    • The C3PO STARTUP.BAS file calls the sub main procedure.

    • sub main calls the RegC3PO command.

    • RegC3PO registers the C3PO with both GroupWise and Windows.

    (Click here for information about Unregistering a C3PO with Windows.)

3.9.4 Testing Your C3PO

  1. Copy the ICONS.DLL file (downloaded with the wizard) into the same directory as your new C3PO files.

  2. Switch to Visual Basic.

  3. Place a breakpoint in the sub main procedure at the RegC3PO call.

  4. Run the C3PO from Visual Basic (Run Start). (The C3PO will not execute because GroupWise has not yet been started.)

  5. Start GroupWise.

    • If your C3PO handles the Ready event, or if you created a new menu item or toolbar button which should be visible, the C3PO should now stop at your breakpoint.

    • If your C3PO is waiting for another event, you should cause that event to occur. The C3PO should then stop at your breakpoint.

  6. You can now place breakpoints in the other .CLS files to ensure that the appropriate procedures are called and that your C3PO is being implemented correctly.

3.9.5 Unregistering a C3PO

Should you ever need to unregister your C3PO, follow these steps:

  1. Switch to your Windows desktop.

  2. Unregister the C3PO from GroupWise and Windows by running the C3PO from Windows (Start Run) using the syntax: XXXC3PO /U

    • The C3PO STARTUP.BAS file calls the sub main procedure.

    • sub main calls the RegC3PO command.

    • RegC3PO unregisters the C3PO in both GroupWise and Windows.

3.9.6 Sample C3PO

The GroupWise SDK includes a sample C3PO named C3POBYWIZ.WIZ that you can copy and use as you wish. This sample is located in the following directory:


The C3POBYWIZ.WIZ sample:

  • Handles Ready and Shutdown events

  • Creates a new menu item under the File/New menu

  • Creates a new context menu item

  • Creates a custom class

  • Handles the Open command of that custom class