Visual Basic: Bilder anzeigen zur Laufzeit
Hallihallo!
Ich hab - trotz nunmehr 2-stündiger Internet-Recherche - es nicht geschafft, mit Visual Basic 2005 eine Bilddatei (bmp oder png) komplett zur Laufzeit anzuzeigen.
Ich habe eine Form (frmMain) mit folgendem dahintergelegtem Code:
Try
Dim pictureBox1 As System.Windows.Forms.PictureBox
pictureBox1 = New System.Windows.Forms.PictureBox()
pictureBox1.Image = Image.FromFile("E:\Bild.bmp", True)
pictureBox1.Visible = False
pictureBox1.Width = 16
pictureBox1.Height = 16
pictureBox1.Left = 16
pictureBox1.Top = 16
pictureBox1.Refresh()
Catch ex As Exception
MsgBox("Fehler: " & ex.Message)
End Try
Es geht aber nicht. Er zeigt einfach keine Grafik an.
Habt ihr irgendeine Lösung???
DANKE!!
lg,
manuel
|