I am currently trying to create a program that will show a slideshow of pictures from an ImageList with variable show times from a ListView, which is acessed through a numericUpDown, but when I click the button to start, nothing happens, until the time of the slideshow ends, where the last slide is shown, then disappears straight away (if i leave out "pictureBox1.Visible = false" at the end, it stays).
现行法典:
private void buttonSlideshow_Click(object sender, EventArgs e)
{
pictureBox1.Visible = true;
for (int s = 0; s < listView1.Items.Count; s++)
{
listView1.Items[s].Selected = true;
pictureBox1.Image = imageList1.Images[s];
DateTime later = DateTime.Now.AddMilliseconds((double)numericUpDown1);
while (DateTime.Now < later)
{
}
}
pictureBox1.Visible = false;
}
我已尝试过许多版本(包括使用时间手和围绕转换代码)的想法,什么是错的。
数字 假设1是滑坡的期间,它一直在使用惯性进行检测,但还是没有工作