Has anyone experiance or a running example how to use within VS C# the NetLink.UI pictureBox to plot graphics, especially using the pictureBox - "MathCommand"
I use the code example below which throw a System.FormatException - wrong input character format
IKernelLink mathKernelLink = MathLinkFactory.CreateKernelLink();
MathKernel mathKernel = new MathKernel();
pictureBox2.Link = mathKernelLink;
mathKernel.GraphicsHeight = pictureBox2.Height;
mathKernel.GraphicsWidth = pictureBox2.Width;
pictureBox2.PictureType = "Automatic";
try { pictureBox2.MathCommand = "Plot[x, {x,0,1}]";}
catch ( FormatException e )
{ Console.WriteLine(e); }
if (mathKernel.Graphics.Length > 0)
pictureBox2.Image = mathKernel.Graphics[0];
MathPictureBoxdisplay the result of a computation, set theMathCommandproperty to a string of Mathematica code (for example,Plot[x, {x,0,1}])." Did it not work as described? Some other common problems are described here. – Oleksandr R. Aug 30 '15 at 23:21