The Show method of the TagSearch object displays the PI tag search dialog.
When programming in Visual Basic 6, there is no need to declare a TagSearch object. Simply type Tagsearch.Show and the TagSearch dialog will be shown. This works in Visual Basic 6 because there is a Global Multiuse PISDKDlg.ApplicationObject object that has a property called TagSearch and returns a TagSearch object. The Global Multiuse PISDKDlg.ApplicationObject is automatically instantiated the first time that the TagSearch dialog is shown by TagSearch.Show. As long as the TagSearch dialog is shown in this manner, the PISDKDlg.ApplicationObject will always return the same instance of the TagSearch Object, which means that the TagSearch dialog will persist changes to itself over the lifetime of the application.
Before version 188.8.131.52 of the PISDKDlg.dll, the TagSearch object was PublicNoncreatable. The TagSearch object needed to be created indirectly via the PISDKDlg.ApplicationObject. This is seamless in Visual Basic 6 because the Global Multiuse PISDKDlg.ApplicationObject is automatically created simply by calling Tagsearch.Show. This is not seamless when programming in C++, Visual Basic .Net, and C# because the ApplicationObject needs to be explicitly created, which is somewhat cumbersome and unintuitive.
As of version 184.108.40.206 of the PISDKDlg.dll, the TagSearch object can be created directly by the programmer without using the PISDKDlg.ApplicationObject. Version 220.127.116.11 of the PISDKDlg.dll is delivered with version 1.3.1 of the PI-SDK. If one decides to create the TagSearch dialog directly in an Application, one must realize that the application will not work unless 1.3.1 of the PI-SDK or greater is installed. For backward compatibility issues it is recommended that the TagSearch object still should be created via the ApplicationObject. However, if backward compatibility is not a concern, then the TagSearch object can be created directly.