Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get a screenshot of the PropertyEditor control? DrawToBitmap not working

Solved!
Go to solution

Where is the NationalInstruments.UI.Design.dll located on the target system? I reread your previous post, where you said that this library was not in the GAC on the target system, but it was in the GAC on your development system. That is expected, but it should be installed to the application directory on the target system.

 

Are you using the merge modules deployment or XCOPY deployment method? This document here explains the difference.

National Instruments
0 Kudos
Message 11 of 25
(2,642 Views)

Hi,

As I told you in previous post, I do not have any NationalInstruments.UI.Design.dll in my system (Neither development machine nor target machine). Only NationalInstruments.UI.dll. Also, my application is installed in the target machine under program files in a directory, let me say, MyApp directory. Into this directory is placed the executable for the application, MyApp.exe and also some other libraries (DLLs). Some of them are the National Instruments Measurement Studio libraries. They are the following:

 

NationalInstruments.Common.dll

NationalInstruments.UI.dll

NationalInstruments.UI.WindowsForms.dll

NationalInstruments.Analysis.Enterprise.dll

NationalInstruments.UI.Styles3D.dll

 

No other National Instruments DLLs are installed in the target system (clean machine). Only the above DLLs are installed under MyApp directory. No other DLLs are used and placed in other places. Also, no merge modules are installed in the target system.

 

The method used is XCOPY. I mean, when application is installed, the above DLLs libraries are copied into MyApp directory.

 

I have checked the links you provide me, and when using XCOPY deployment, I have seen that some deployment files are necessary in the link below:

 

XCOPY deployment files

 

I see that for the above DLLs that I have commented, it is needed the following file dependencies according to the link above:

 

For NationalInstruments.Common:

 

NationalInstruments.Common.dll
NationalInstruments.Common.Native.dll
NationalInstruments.NiLmClientDLL.dll
NationalInstruments.MStudioCLM.dll
msvcr100.dll

 

For NationalInstruments.UI:

 

NationalInstruments.UI.dll
NationalInstruments.UI.Styles3D.dll
NationalInstruments.Common.dll
NationalInstruments.Common.Native.dll
NationalInstruments.NiLmClientDLL.dll
NationalInstruments.MStudioCLM.dll
mesa.dll
msvcp100.dll
msvcr100.dll
msvcrt.dll

 

 

For NationalInstruments.UI.WindowsForms:

 

NationalInstruments.UI.WindowsForms.dll
NationalInstruments.UI.dll
NationalInstruments.UI.Styles3D.dll
NationalInstruments.Common.dll
NationalInstruments.Common.Native.dll
NationalInstruments.NiLmClientDLL.dll
NationalInstruments.MStudioCLM.dll
mesa.dll
msvcp100.dll
msvcr100.dll
msvcrt.dll

 

So I wonder if I need to copy other DLLs into my MyApp directory where application is installed.

 

In my application, it is only used ScatterGraph and PropertyEditor components. No other components are used, so could you tell me, using XCOPY, exactly which DLLs I have to copy into my MyApp directory when application is intalled in the target in order to solve the problem?

 

Notes:

The target machine is a clean machine. NI measurement studio is not installed. Neither is installed Visual Studio nor other kind of software.

 

 

 

 

 

0 Kudos
Message 12 of 25
(2,633 Views)

In the the XCOPY help topic, step 6 explains that you will also need to include NationalInstruments.UI.Design assembly in your distribution. You can include it in the MyApp directory.

National Instruments
0 Kudos
Message 13 of 25
(2,630 Views)

Hi again,

Yes, you are right. Sorry, I have just seen it now. But I do not have any NationalInstruments.UI.Design.dll file in my system. The place where step 6 says it should be located I do not have any NationalInstruments.UI.Design.dll.

 

I only have NationalInstruments.UI.Design assembly in C:\Windows\Assembly directory but this is an assembly not a DLL.

 

So where is this DLL? I have Measurement Studio 8.6.

 

Thanks

0 Kudos
Message 14 of 25
(2,628 Views)

I had not realized this until now, but it looks like we did not install it to the location specified in the help document I linked before until MStudio 2009. It was not in the XCOPY documentation until then either.

 

NationalInstruments.UI.Design.dll is actually an assembly, and you can copy it from the GAC for deployment purposes. It does not need to be installed into the GAC on the target system.

 

I apologize for the confusion.

National Instruments
0 Kudos
Message 15 of 25
(2,622 Views)

Ok,

The problem is that you cannot copy an assembly directly from GAC. You must do some workarounds to achieve this, below some links:

 

Copy an assembly from the GAC

Copy an assembly from the GAC

 

So, now I can copy NationalInstruments.UI.Design.dll.

 

Some things: I only have to copy NationalInstruments.UI.Design.dll to my AppDir where MyApp.exe and other National Instruments DLLs are, right?

Or Do I have to do something else? for example, Do I have to add a reference to NationalInstruments.UI.Design.dll in my Visual Studio Project? or is it not necessary? Only by copying NationalInstruments.UI.Design.dll to my AppDir it should work?

 

Now, I am at home and I cannot check this. Tomorrow I'll check it at work and I'll tell you something.

 

Thanks very much.

 

 

 

0 Kudos
Message 16 of 25
(2,618 Views)

That is correct. NationalInstruments.UI.Design does not need to be included in your project references. It is an "optional" dependency of NationalInstruments.UI used for design time support, which includes the PropertyEditor control. You can place the assembly in the MyApp dir because the application will search there when looking for dependencies.

National Instruments
0 Kudos
Message 17 of 25
(2,614 Views)

Hi,

I have checked this. I have put NationalInstruments.UI.Design.dll in the MyApp directory where MyApp.exe and DLLs are.

 

Results are:

WIndows XP: In edit mode, when you drop-down the list of items, image and text, for example, for line step, is correctly shown. Before copying NationalInstrumetns.UI.Design.dll it was not working so this has been solved but there is a problem, when property editor is not in edit mode, and it is painted in the datagridview's cell, only image is shown but not the text below. See screenshot windowsXP_sample.

 

Windows 7: It works perfectly when drop-drown the combobox and also when showing in the datagridview's cells. See screenshot windows7_sample. So in this case no problems.

 

Conclusion: The only problem now is on windows xp, and only when datagridview's cell are being painted. In my .NET application I have overrided paint method but what is being done inside this method, is independently of the OS. Its implementation is always the same for any version of Windows.

Download All
0 Kudos
Message 18 of 25
(2,602 Views)

Hi,

Have you tried to reproduce the issue that I am getting on Windows XP? I have not had any feedback from you yet. Could you tell me something about your progress? thanks a lot.

0 Kudos
Message 19 of 25
(2,552 Views)

Yes, I am in the process of reproducing this right now. I have the LineStep property configured in the DataGridView, but I have not figured out how to display the image yet. Is this something you achieved in your custom paint method? Could you elaborate on this?

National Instruments
0 Kudos
Message 20 of 25
(2,549 Views)