NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how will I be able to make the TestStand UI objects into XP theme?

Solved!
Go to solution

Hi, I am using TestStand UI in .net, How will I be able to make the UI objecys of TestStand to adapt the XP theme?

Is there any example code that you can give me? Thanks!

0 Kudos
Message 1 of 9
(4,031 Views)

Hi,

 

What language are you using in the .NET framework and which UI objects are you wanting to adapt to the Windows XP theme?Also, are you building on a shipped TestStand UI that is located in C:\Program Files\National Instruments\TestStand X.x\UserInterfaces

 

-Adri

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 2 of 9
(4,008 Views)

Thanks for the reply Adri K.

 

 

I am using .NET Framework 3.5 and TestStand 4.1.1

I am going to adapt axSequenceView, axListBar, axReportView, and axListBox.

No, I am building in a different project. I saw that there are instructions there about XP theme but seems a little bit confusing.

 

 

0 Kudos
Message 3 of 9
(4,006 Views)

Hi,
 
Could you please clarify as to what XP theme adaption you are wanting within the TestStand UI (color scheme, appearance, etc)? Also, you have indicated that you have seen instructions to do that you are wanting, but it is not clear as to where you have located these instructions. I would like to look at the documentation that you have located.

-Adri

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 4 of 9
(3,980 Views)

Basically skins and visual styles.

The instruction is from the note in the sample code that comes with it.

Below is the excerpt:

// Note: The CopyManifestToOutputDirectory project copies the TestExec.exe.manifest file to the directory of the built executable.

// Distribute this file with the built executable to enable XP themes for the application. The manifest file name must match the executable filename.

// Note that the Application.EnableVisualStyles method is not sufficient for enabling XP themes because it doesn't work for ActiveX controls, as of .NET 1.1.

// Also, calling Application.EnableVisualStyles apparently leads to a crash in the FCL when certain forms close.

// In addition, note that .NET 1.1 doesn't support theme textures for tab pages (see www.codeproject.com/cs/miscctrl/themedtabpage.asp)

0 Kudos
Message 5 of 9
(3,976 Views)

Hi,


It is not clear as to what notes you are referencing as being included with the project. Where did you obtain the project from? Was it customized by another developer? The User Interfaces that ship with TestStand include a .manifest, but we don’t ship a CopyManifestToOutputDirectory project. The notes you included in the above post indidate that this project will copy the TestExec.manifest, which is something that we ship with TestStand.


-Adri

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 6 of 9
(3,960 Views)

Hello - The note is coming from the user interfaces examples that comes with TestStand 4.1.1. and it was not customized by any developer.

Going back to my question, the note is implying that TestStand UI's have capability of adapting XP theme. My question is how?

 

Thanks,

Mbd

0 Kudos
Message 7 of 9
(3,956 Views)
Solution
Accepted by -mbda-

The shipped TestStand  .NET Operator Interface  has a manifest file included in the project. This manifest file includes the Micrsoft.Windows.Common-Controls which is needed to identify the XP theme that has been configured on the operating system. In the shipped .NET Operator interface, this .manifest file is being embedded into the executable and formats the TestStand Operator Interface to display the XP theme that has been configured on the operating system. in the shipped TestStand 4.1.1 Operator Interface, the manifest file is embedded into the executable in a Project post-build event.

There are three things that the manifest file is required to have in order to allow the TestStand Operator Interface executable to adapt to the XP theme. They are as follows:

  1. The manifest file must have the same name as the executable. For example, if your executable is named MyExecutable.exe, your manifest file is required to have the name MyExecutable.exe.manifest.


  2. The manifest file must include the Micrsoft.Windows.Common-Controls in order to identify the XP theme that has been configured on the operating system.


  3. The manifest file must reside in the same directory as the executable.
If you are building on an existing Operator interface that ships with TestStand 4.1.1, make sure that the manifest file meets these two requirements. If it does you can test that the theme is properly adapting by selecting Debug»Start Without Debugging.



If this works properly, you can rest assured that when building a release version of the TestStand Operator Interface, it will adapt to the XP theme that has been configured on the operating system.

NOTE:  that you can only test this feature if you launch the executable without debugging because this allows the executable to run its own process. If you run the executable with debugging, the Visual Studio environment will host the process and will not allow the manifest file to be embedded into the executable.

-Adri
Message Edited by Adri K. on 03-04-2009 04:15 PM
Adri Kruger
National Instruments
LabVIEW Product Marketing
Download All
0 Kudos
Message 8 of 9
(3,910 Views)

Thanks Adri K.

 

For the people who are trying this in VS2008, one thing that I did to make it work aside from what Adri K. mentioned is you need to uncheck the Enable the Visual Studio hosting process in the Debug tab in project properties.

Also, upon deploying the manifest using Clickonce, change the build action property of manifest file to Embedded Resource.

Message 9 of 9
(3,887 Views)