ShowConnectionDialog Example

 

In this example, the PI-Connection Manager dialog is added to the File/Connections menu item.

 

Create a new Visual Basic project. Click on Menu Editor in the Tools menu and add a menu item with Caption = "File" and Name = "menu_File". Add another menu item with Caption = "Connections" and Name = "menu_Connections". Indent the second menu item and click OK.

 

Make a reference to the PI-SDK Dialogs and the PISDK Type Library. Paste the code into the Declarations section. Run the project.

 

Private Sub menu_Connections_Click()

Dim Cxn as New PISDKDlg.Connections

 

Cxn.ShowConnectionDialog

End Sub

 

We called the method with no parameters, so the Server Information dialogs will be modeless and the user will not be able to edit the Known Servers Table.(Some of the buttons and menu items will be disabled.)

Enabling Operational Intelligence