간단한 이미지 뷰어를 만들려고합니다. 나는 다음과 같은 코드를 사용하여 폴더에서의 PictureBox에 이미지를로드 할 수 있습니다 : 이것은 단순히 폴더에서 이미지를 선택하고있는 PictureBox에로드 나를 수폴더에 다음 이미지를로드하는 방법은 무엇입니까?
private void button1_Click(object sender, EventArgs e)
{
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = "Open Image";
dlg.Filter = "All|*.jpg;*.bmp;*.gif;*.png|JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif|PNG Image|*.png";
if (dlg.ShowDialog() == DialogResult.OK)
{pictureBox1.Image = new Bitmap(dlg.FileName); }
}
}
. 이제 "Next Image"버튼을 만들 수 있는지 알고 싶습니다.이 버튼은 어떤 이미지를로드했는지 인식하고 같은 폴더에있는 다음 이미지를 찾고 picturebox에서 엽니 다. 미안해, 내 영어가별로 좋지 않아. 감사.