AndrewShev05
Member
- Joined
- Dec 9, 2021
- Messages
- 12
- Programming Experience
- Beginner
Hello, I am a bare-bones beginner with very little to no knowledge of C# programming, also new to the forum. I want to make an image viewer to load a whole folder of images and be able to scroll through them. I met a large speedbump that I cannot figure out. I am using the folder browser dialog because I need to select the whole folder. Below is the code I have, but I can't get it to work. I need the folder to be selected through the folder browser dialog and placed into the picture box. Please help.
private void loadButton_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Load(folderBrowserDialog1.SelectedPath);
}
}
private void loadButton_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Load(folderBrowserDialog1.SelectedPath);
}
}