Servus!
Hab ich heute gleich noch eine Frage. Ich möchte in meinem Programm in einem Panel mehrere Pictureboxen mit Bild erzeugen.
Leider wird immer nur eine Picturebox erzeugt. Was mache ich falsch ?
MFG Andi2572
Hab ich heute gleich noch eine Frage. Ich möchte in meinem Programm in einem Panel mehrere Pictureboxen mit Bild erzeugen.
Leider wird immer nur eine Picturebox erzeugt. Was mache ich falsch ?
VB.NET-Quellcode
- For i As Integer = 0 To lbImages.Items.Count - 1
- Dim File As String = Application.StartupPath & "\Patienten\" & TSPatNr.ToString.Remove(0, 18) & "_" & TSNachname.ToString.Remove(0, 10) & "\" & lbImages.Items(i).ToString
- Dim pb(i) As PictureBox
- pb(i) = New PictureBox
- Me.Panel1.Controls.Add(pb(i))
- pb(i).Tag = i
- pb(i).Name = "pb" & i.ToString
- pb(i).Image = Image.FromFile(File)
- pb(i).Size = New Size(80, 80)
- pb(i).SizeMode = PictureBoxSizeMode.Zoom
- Next
MFG Andi2572