Working with Activex / Com Objects
You can use your Com Objects and Activex Objects as you always did. With support for Dynamic Com Object creation and support for Compiling Forms with Activex objects, your investment in Activex is kept and you can continue to enhance your Apps with Activex if you want.
In this document:
Com Objects
You can keep working with Com Objects the way you used to do with VFP. All the dynamic features are there, you can pass skip optional arguments, work with indexed properties, default member properties in the same way you did in VFP.
This is a snippet of the ComExcelDemo:.
LOCAL oApp, oWorkBook, oSheet
oApp = CreateObject("Excel.Application")
oWorkBook = oApp.Workbooks.Add()
oWorkBook = oApp.Workbooks(1)
As you can see it is fully dynamic, no need to add anything to start working and it works really nice.
But surely you may want some Intellisense for your Com programming. To Achieve that you add a reference to your Com Library using the Add Reference dialog:
- Choose View Projects, to display the Project Explorer and Right click in the project you want to add the reference to:

- Choose Add Reference the "Add Reference" Dialog appears. Choose the COM Tab:

- Scroll to the Library or libraries you want to import in this example we will import MSXML6 as shown below. Select the library in the list and click select for each library you want to import. When done click OK

- It will create a managed dll and add as a reference to your project as shown below
- :

- Then you can use Intellisense for the types contained in that library using:

NOTE : In the March edition you had to use the Two Colons instead of the Dot Notation in VFP for LOCAL Variable declaration. Starting with the April update you can declare it with:
LOCAL oXML as MSXML2.DOMDocument
Activex Controls
You can keep working with Activex Controls inside VFP Forms as you always did. No need to change your habits, it will work as in VFP.
Below is a form with a TreeView being designed in VFP with an event (NodeClick) for the TreeView:

And here is the same form running under .NET without changes:

Threading requirements
Note: Due to the threading requirement you may need to make your Main method (the entry point in your exe) Single Threaded Aparment, for that you use the following notation:. See the OleControls_TreeView sample for more details.
[STAThread];
PROCEDURE Main as void
LOCAL oForm
oForm = CreateObject("form") && Screen
oForm.Show()
DO FORM "test_treeview.scx"
READ EVENTS