Bild in Picturebox wird bei start des programmes schwarz- warum?[Visual Basic 2008]

Erik

Erfahrenes Mitglied
Wenn ich das Bild in eine Picturebox einfüge und das Programm starte wird es Schwarz.
Warum?

Das Bild:
image.png
 
Hallo

Ich habe es mal probiert, bei mir gehts.
Code:
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            Dim oStream As New System.IO.FileStream("D:\Weltkarte.png", IO.FileMode.Open)
            PictureBox1.Image = New Bitmap(oStream)
            oStream.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class
 

Anhänge

  • Test.jpg
    Test.jpg
    15,7 KB · Aufrufe: 11

Neue Beiträge

Zurück