Dim myimage As Image 'modifie selon tes besoins myimage = My.Resources._10_prota_a For Each C As Control In Me.Controls If TypeOf (C) Is PictureBox Then DirectCast(C, PictureBox).Image = myimage End If Next
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question"blue_off_16"
Public LedPictureOff As System.Drawing.Bitmap
ca ne fonctionne pas...
Public LedPictureOff As System.Drawing.Bitmap Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load LedPictureOff = My.Resources.blue_off_16 For Each C As Control In Me.Controls If TypeOf (C) Is PictureBox Then DirectCast(C, PictureBox).Image = LedPictureOff End If Next end sub
For Each picture In Me.Controls lstAddress.Items.Add(picture.GetType) If TypeOf (picture) Is PictureBox Then DirectCast(picture, PictureBox).Image = LedPictureOff End If Next
Public LedPictureOff As System.Drawing.Bitmap