' Remove Picture from the Screen RemoveHandler pict.MouseMove, AddressOf imgPictureMouseMove RemoveHandler pict.MouseDown, AddressOf imgPictureMouseDown RemoveHandler pict.MouseClick, AddressOf imgPictureMouseClick SplitContainer1.Panel2.Controls.Remove(pict) ' Remove Picture from the ListBox myIndex = PicturesListBox.SelectedIndex PicturesListBox.Items.RemoveAt(myIndex) ' Remove Picture from the ObjectList myObjectList.RemoveAt(myIndex)
' To keep the focus of the picture in right order before tagging the picture list For i = PicturesListBox.Items.Count - 1 To 0 Step -1 PicturesListBox.SetSelected(i, True) Next ' Re-indexing the picture Tag For Each ctl In Me.SplitContainer1.Panel2.Controls If TypeOf ctl Is PictureBox Then pict = CType(ctl, PictureBox) iTag = iTag + 1 pict.Tag = iTag End If Next
voir mon message precedent
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionSi j'ajoute 5 ou 6 images et que j'en enleve une