MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NET/Link graphics

  • To: mathgroup at
  • Subject: [mg47473] Re: NET/Link graphics
  • From: "Hans Michel" <hansjm at>
  • Date: Tue, 13 Apr 2004 06:26:26 -0400 (EDT)
  • References: <c5dif4$nu0$>
  • Reply-to: "Hans Michel" <hansjm at>
  • Sender: owner-wri-mathgroup at


Try this instead of using a MathPictureBox use a regular PictureBox and a
Mathlink .NET IKernelLink

EvaluateToImage is essentially an image so save it to as a new Bitmap and
render that image in a pictur box.

private Bitmap MyImage ;
  MyImage = new Bitmap(ml.EvaluateToImage("Plot[x,{x,0,1}]", 400, 400));
   pictureBox1.Image = (Image) MyImage ;


"Brown, Matt" <mbrown at> wrote in message
news:c5dif4$nu0$1 at
> When I use the MathPictureBox from within Mathematica it works just fine.
But when I try to use it from a dotNET program, and set the MathCommand
string I always get a System.Format error, saying that the string is the
wrong format. MathPictureBox uses the EvaluateToGraphics method. When I try
to use this in my code I get the same error, even when I paste the API
example directly into my code.
> ie:
> ml.EvaluateToImage("Plot[x,{x,0,1}]", 400, 400);
> this is driving me nuts. Any ideas?

  • Prev by Date: RE: InLine Formatting
  • Next by Date: Re: Re: All combinations
  • Previous by thread: Re: NET/Link graphics
  • Next by thread: InLine Formatting