Represents a dialog box that allows the user to browse and select an OPC item or items.
For a list of all members of this type, see BrowseItemsForm Members.
Visavi.Opc.Client.Forms.BrowseItemsForm
[Visual Basic] Public Class BrowseItemsForm Inherits Form [C#] public class BrowseItemsForm: Form [C++] public __gc class BrowseItemsForm : public Form [JScript] public class BrowseItemsForm extends Form
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
This class allows you to browse OPC items on a specific OPC server. The path to
the server is specified with the
ServerIdentifier property. Use the
MaximumSelectionCount property to limit the number of items that the
user may select. Show the dialog by calling the
[Visual Basic, C#]
The following example uses the BrowseItemsForm and illustrates creating
and showing the dialog box. The example uses the
[Visual Basic] Protected Sub button1_Click(sender As Object, e As System.EventArgs) Dim identifier As New ResourceIdentifier() identifier.ProgID = "Visavi.OpcSimulation" Dim browseItemsForm As New BrowseItemsForm() browseItemsForm.ServerIdentifier = identifier If browseItemsForm.ShowDialog() = DialogResult.OK Then Dim itemsMessage As New String("Selected Items:\n") For Each item As String In browseItemsForm.SelectedItems itemsMessage += item + "\n" Next MessageBox.Show(itemsMessage) End If End Sub [C#] protected void button1_Click(object sender, System.EventArgs e) { ResourceIdentifier identifier = new ResourceIdentifier(); identifier.ProgID = "Visavi.OpcSimulation"; BrowseItemsForm browseItemsForm = new BrowseItemsForm(); browseItemsForm.ServerIdentifier = identifier; if (browseItemsForm.ShowDialog() == DialogResult.OK) { string itemsMessage = "Selected Items:\n"; foreach (string item in browseItemsForm.SelectedItems) itemsMessage += item + "\n"; MessageBox.Show(this, itemsMessage); } }
[C++, JScript]
No example is available for C++ or JScript. To view a Visual Basic or C#
example, click the Language Filter button
in the upper-left corner of the page.
Namespace: Visavi.Opc.Client.Forms
Platforms: Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
Assembly: Visavi.Opc.Client.Forms