Example 1. Save mathematical expression as image file
In this example, step by step we`ll create a small demo application, that must save mathematical expression as image file.
First of all, we create a form and put our enter field for math expression (MEEL) and the button "Save" on it
We define the Action to be performed by pressing the button "Save"
- private void button1_Click(object sender, EventArgs e)
- // save image, background color - White
- Image img = this.mathControl1.SaveToImage(Color.White);
- // Create SaveFileDialog
- using (SaveFileDialog dlg = new SaveFileDialog())
- if (dlg.ShowDialog() == DialogResult.OK)
- // save the image into the file
That's all, the application is ready.