Ich weiß nicht, was hier los ist! Es öffnet sich ein "OpenFileDialog", es lädt das Bild in der PictureBox, aber das Bild wird nicht gestreckt. Bitte helfen Sie! Danke :)Bild für PictureBox öffnen - C#
private void browsePic_Click(object sender, EventArgs e)
{
openPicture.Filter = "PNG|*.png|JPG|*.jpg;*.jpeg";
if(openPicture.ShowDialog() == DialogResult.OK)
{
pictureBox2.BackgroundImageLayout = ImageLayout.Stretch;
pictureBox2.Image = new Bitmap(openPicture.FileName);
}
}
Bildgröße automatisch einstellen? – Haris