オーバレイ自体を削除する方法とオーバレイ上の図形の消去方法について示します。
- 1. オーバレイの削除
 オーバレイを削除するには Overlays の Remove を使用します。 オーバレイへのハンドルを保管している場合は null で初期化する事を忘れないよう注意してください。
- private void overlayDelToolStripMenuItem_Click(object sender, EventArgs e) - { -      -     if (true == cFviImageView1.Display.FindOverlay(m_overlay1)) -     { -         cFviImageView1.Display.Overlays.Remove(m_overlay1); -         m_overlay1 = null; -     } -      -     if (true == cFviImageView1.Display.FindOverlay(m_overlay2)) -     { -         cFviImageView1.Display.Overlays.Remove(m_overlay2); -         m_overlay2 = null; -     } -     cFviImageView1.Refresh(); - } 
 
- 2. オーバレイ上の図形の消去
 オーバレイ上の図形を消去するには Figures の Clear を使用します。
- private void overlayClrToolStripMenuItem_Click(object sender, EventArgs e) - { -      -     if (true == cFviImageView1.Display.FindOverlay(m_overlay1)) -         m_overlay1.Figures.Clear(); -      -     if (true == cFviImageView1.Display.FindOverlay(m_overlay2)) -         m_overlay2.Figures.Clear(); -     cFviImageView1.Refresh(); - }