/// <summary> /// CGM file is drawn every time form repaints /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Paint(object sender, PaintEventArgs e) { if (cgm == null) { return; } cgm.Draw(e, 30, 50, (float)numericUpDownScalePercent.Value / 100.0f); }