User 7eb23419ad
12-11-2013 13:05:51
Hallo,
i try to use the MarvinViewControl for .NET 4.
I have molfile strings which i use to show on the MarvinViewControl. The problem is that i always get the following error in the control:
"The type initializer for 'chemaxon.marvin.paint.internal.ColorCollection' threw an exception".
Can anyone help me?
ChemAxon 2e7d8629fa
12-11-2013 15:23:46
User 7eb23419ad
12-11-2013 16:26:53
Hi,
I use the version 6.1.2.2.
If i use it in an empty winforms solution, it works. In my project i always get this error. Could there be a problem with infragistics?
ChemAxon eb65a25631
12-11-2013 16:44:51
Hi,
Please make sure, that all the JChem.NET assemblies are available when you run your project.
Also be aware, that .NET Compact Framework, and .NET 4 Client Profile are not supported.
The officialy supported framework version is .NET 3.5 (, though it might run on .NET 4 full profile).
Regards,
Andras
User 7eb23419ad
13-11-2013 10:48:37
Hi,
I created a new application with .NET4 and Infragistics and all works. I also tried to generate a picture with the molecule renderer and got the error, too.
ChemAxon eb65a25631
13-11-2013 11:16:51
Hi,
Could you post the code that causes the error?
The exact same code, on the exact same machine works when you try it within a WinForms application?
Regards,
Andras
User 7eb23419ad
13-11-2013 11:19:51
Hi,
I use this code:
StructureDrawingInfo drawingInfo = new StructureDrawingInfo(new Size(width, height));
JChemMolecule molecule = new JChemMolecule(new MoleculeData(molfile, MoleculeFormat.Unknown));
molecule.CheckNull("molecule").Renderer.Settings = new JChemMoleculeRenderingSettings(drawingInfo);
Image moleculeImage = molecule.Renderer.RenderToImage(ImageFormat.Png);
This code works on another winforms application on the same machine with the same framework.
ChemAxon eb65a25631
13-11-2013 11:51:22
This works for me with even a Console Application.
What is the project type ('output type' in project properties) where it doesn't work?
A.
User 7eb23419ad
13-11-2013 12:21:06
Hi,
it's an Windows Application.
I use this code in a user control and want to fill a picture box. Even if i use the MarvinViewControl and fill it with a molfile i get the same error.
I tried the same in the blank windows application and there all works.
ChemAxon eb65a25631
13-11-2013 14:53:18
Hi,
I downloaded a trial version of NetAdvantage_Ultimate2013 library.
Created a WinForms .NET 4 application.
Added an UltraButton from the Infragistics control library, and added the code above to the Click event handler.
It works without any problem.
I suspect there is some kind of configuration problem in your project.
Could you send us a basic demo project which we can reproduce the problem?
A.
User 7eb23419ad
13-11-2013 15:04:02
Hi,
i found the problem. I have to replace isentris controls with chemaxon controls. And if i have the references for isentris (MDL) and the chemaxon references in the project, it doesn't work. If i delete the MDL references, it works.