これは再生ボタンのコードです:
private void btnPlay_Click(object sender, EventArgs e)
        {
            _files = new List<FileInfo>(); 
            _indx = 0;
            DirectoryInfo dir = new DirectoryInfo(filesForanimation);
            if (_files == null)
                _files = new List<FileInfo>();
            fi1 = dir.GetFiles("*.bmp");
            _files.AddRange(fi1);
            _files = _files.OrderBy(f => f.LastWriteTime).ToList();
            button14.ForeColor = Color.Red;
            button13.ForeColor = Color.Black;
            button12.ForeColor = Color.Black;
            timer3.Start();
            button13.Enabled = true;
            button13.Text = "Pause";
            button12.Enabled = true;
            trackBar1.Maximum = fi1.Length;
            trackBar1.Minimum = 0;
        }
次に、タイマー ティック イベント:
private void timer3_Tick(object sender, EventArgs e)
        {
            try
            {
                Image iOLd = this.pictureBox1.Image;
                trackBar1.Value = _indx;
                label23.Text = _files[_indx].Name;
            if (checkBox1.Checked)
            {
                Image img = Image.FromFile(_files[_indx].FullName);
                this.pictureBox1.Image = img;
                this.pictureBox1.Image = null;
                pictureBox1.Refresh();
            }
            else
            {
                Image img = Image.FromFile(_files[_indx].FullName);
                this.pictureBox1.Image = img;
            }
            if (iOLd != null)
                // iOLd.Dispose();
                _indx++;
            if (_indx >= _files.Count)
            {
                _indx = 0;
                trackBar1.Value = 0;
            }
                timer3.Interval = Convert.ToInt32(numericUpDown1.Value); 
            }
            catch
            {
            }
        }
そして、checkBox チェック イベント:
private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox1.Checked) 
            {
                Graphics g = Graphics.FromImage(pictureBox1.Image);
                g.Clear(SystemColors.Control);
                pictureBox1.Invalidate();
            }
            else
            {
                pictureBox1.Load(fi[trackBar1.Value].FullName);
                pictureBox1.Invalidate();
            }
        }
問題はタイマーティックにあります。初めて if (checkBox1.Checked) 内で試したのは、pictureBox1.Refresh(); だけでした。しかし、再生ボタンを押すと、白い背景に大きな赤い X が表示されます。だから私は//行をマークしました: iOLd.Dispose(); だから今、私はピクセルのみの図面を見ていますが、それらは決して変化しません。何らかの理由で、ハードディスクから新しい画像をロードしないと思います。同じ画像を何度も移動し続けます。
それで、if (checkBox1.Checked) で今のようにしようとしました:
Image img = Image.FromFile(_files[_indx].FullName);
                    this.pictureBox1.Image = img;
                    this.pictureBox1.Image = null;
                    pictureBox1.Refresh();
しかし、この場合、trackBar とタイマーは一度画像番号 2 に移動し、何もせずにそこで停止します。
そして、これは、チェックボックスがチェックされていない場合にのみチェックされ、pictureBoxにピクセルと背景画像が正常に機能している場合にのみ発生します。
** Cleared を修正し、質問を短くしました **