Programming with the .NET user controls requires that you add the controls to your VS.NET project. If you plan to use the PI-SDK you need to add a reference to each SDK Interop assembly that you are going to use.
Open your Visual Studio.NET project. From the Project menu, or References item of the Solution Explorer pane, select Add Reference. In the dialog presented, select the .NET pane and scroll down until you see the items like "OSIsoft.PISDK". Select/highlight the wanted items, press Select and then OK to close the dialog.
If the Interops are not listed, you will need to browse for them. In the presented dialog, press Browse button and browse to PI-SDK installation directory (e.g. c:\program files\pipc\pisdk), select the wanted assemblies (osisoft.xxx.dll), press Open and then OK.
Select View/Object Browser menu, select OSIsoft.PISDK from the presented tree-view and browse the methods, properties, and events for the objects. Context-sensitive help is available on the bottom of the browser window.
You may also want to select OSIsoft.PITimeServer and OSIsoft.PISDKCommon Interop when building PI-SDK applications. These libraries supply historical time objects and some generic collections and interfaces that are used as arguments to some PI-SDK methods.
From the View menu, select the Toolbox item, right-click on the toolbox and select Add/Remove Items. In the presented dialog, locate and select the MDBTreeNet control and press OK.
If the control is not present you need to locate it. Press Browse and navigate to PISDK installation folder. Select/Highlight OSISoft.SDK.Controls.MDBTreeNet.dll and press Open and finally OK to close the dialog.
The following picture illustrates what the MDBTreeNet user control looks like in VS.Net Object Browser.
From the View menu, select the Toolbox item, right-click on the toolbox and select Add/Remove Items. In the presented dialog, locate and select the PIArchiveEditor or PIAnnotationEditor (or both) and press OK.
If the control is not present you need to locate it. Press Browse and navigate to PISDK installation folder. Select/Highlight OSISoft.SDK.Controls.PIArchiveEditor.dll, press Open and check/select the desired controls. Press OK to close the dialog.
The object browser view is similar to the MDBTreeNet view:
With the reference in place, you can now create a new instance of a dialog. You can use the full name, i.e. OSIsoft.PISDK.Controls.PIArchiveEditDlg or the plain class name (PIArchiveEditDlg) if you add a using statement to your code (using OSIsoft.PISDK.Controls). Same instructions apply to the PIAnnotationEditDlg dialog.
Please view the "Adding the PI-SDK Controls to Your Visual Basic Project" on how to use the dialogs in VB6 projects.