0

我在图片框中各有三张图像,当线程开始时,它们开始旋转

threads[0] = new Thread(new ThreadStart(Display1));
        place(ref threads[0], comboBox1.SelectedIndex);
        threads[0].Start();

然后在 display1 函数中我使用下面的代码来旋转

   protected void Display1()
    {
        for (long i = 0L; i < 200000; i++)
        {


            {
                Image img = pictureBox1.Image;
                img.RotateFlip(RotateFlipType.Rotate90FlipNone);
                pictureBox1.Refresh();
            }
        }

    }

但它只是得到未处理的异常“对象当前在其他地方使用”我尝试使用 lock 和 picturebox1.invalidate 但我没有用。

4

0 回答 0