02-24-2009 07:34 AM
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!
Solved! Go to Solution.
02-25-2009 08:14 AM
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
02-25-2009 08:25 AM
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.
02-25-2009 03:55 PM
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
02-25-2009 04:18 PM
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)
02-26-2009 10:06 AM
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
02-26-2009 11:14 AM
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
03-04-2009 04:11 PM - edited 03-04-2009 04:15 PM
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:
03-05-2009 09:46 AM
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.