Compound Files

Using Compound Documents

In this exercise, you will add a Microsoft Excel Chart to a Visual Basic form as an OLE compound document. Support will be automatically provided for in-place editing.

* To create the Visual Basic project

  1. Start Visual Basic and create a new Standard project.
  2. Add a new OLE control to the form.
  3. From the Object Type list, select Microsoft Excel Chart and click OK .

    A sample chart will be displayed in the control. In-place editing will automatically be enabled.

  4. Press the ESCAPE key to return the Visual Basic toolbar.

* To test in-place editing

  1. Run the application.
  2. Double-click the Microsoft Excel chart.

    This will begin in-place editing. Notice the Excel menu that is presented on the form.

  3. From the View menu, select Toolbars and click Chart .

    The Microsoft Excel chart toolbar will become visible.

  4. From the Chart toolbar, click Chart Type .
  5. Click 3-D Bar Chart and notice the changes to the embedded chart object.
  6. Press ESCAPE twice to disable in-place editing and return to Visual Basic.

    The chart has been updated with the new type.

  7. Stop the application and exit from Visual Basic.


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

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