Using TestStand UI Controls in Microsoft Visual Studio
- Aktualisiert2025-07-23
- 2 Minute(n) Lesezeit
Using TestStand UI Controls in Microsoft Visual Studio
To use the TestStand User Interface (UI) Controls in Microsoft Visual Studio, drag the TestStand UI Controls from the TestStand tab on the Visual Studio Toolbox onto a form.
When you create a new project in a supported version of Visual Studio, select Project»Project Name Properties, click the Build tab, and select x86 from the Platform Target ring control in the General section of the dialog box so the project can access the TestStand API and UI Controls on 64-bit versions of Microsoft Windows.
Visit ni.com/info and enter the Info Code tsuivs2010 to access the NI KnowledgeBase article 5NK6NKXU, Why do I Receive an Error when Using Visual Studio 2010 to Build a TestStand User Interface?, for information about building TestStand user interfaces in Visual Studio 2010.
If the Visual Studio Toolbox window does not display the TestStand tab when you edit a form, or if the TestStand Interop assemblies do not appear in the Add References dialog box, exit all running copies of Visual Studio, launch the TestStand Version Selector, select the current version of TestStand, and click the Make Active button.
You must also add references to the TestStand Interop assemblies and the TestStand Utility (TSUtil) assembly to the project.
When you create a Multiple Document Interface (MDI) application with TestStand UI Controls on an MDI child form, Microsoft .NET resets the properties you programmatically set on the TestStand UI Controls to default values when you set the MdiParent property on the child form. .NET resets these properties because .NET destroys and recreates ActiveX controls on a form when you set the property on the form. To avoid this issue, set the TestStand control properties after you set the MdiParent property on the form or place all TestStand UI Controls and other ActiveX controls on a Panel control instead of directly on the form.