Creatiel
Messages postés21Date d'inscriptionjeudi 1 mai 2003StatutMembreDernière intervention25 septembre 20081 29 janv. 2008 à 12:57
re,
BackgroundColor ? Plutôt BackColor, si c'est ça... c'est bien ce que j'ai fait !
Dans VB 2005, je n'ai pas réussi à indexer des controls en mode création. Je génère donc un PictureBox indexé lors de l'exécution, ce qui donne un code de ce genre :
(après création de Panel1 dans la Form)
Dim CheminImages As String = "C:\Documents and Settings\All Users\Documents"
Dim MonImage(1, 16) As PictureBox
Me.Panel1.BackColor = Color.Transparent
MonImage(1,1) = New PictureBox
Me.Controls.Add(MonImage(1,1))
Dim PositionPanel1 As New System.Drawing.Point(Panel1.Location)
Dim PositionImage As New System.Drawing.Point(100, 100))
With MonImage(1,1)
.Location = PositionImage + PositionPanel1
.Image = Image.FromFile(CheminImages & "image1.gif")
.SizeMode = PictureBoxSizeMode.AutoSize
.BackColor = Color.Transparent
.BackgroundImage = Nothing
.BringToFront()
.Visible = True
End With
Mais l'affichage de image1.gif sur le Panel n'est transparent !!!!
NHenry
Messages postés15112Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention13 avril 2024159 29 janv. 2008 à 08:43
Bonjour
Comment ça plus la transparence ?
La couleur de transparence est de la couleur du fond de la PictureBox, si c'est le cas, met le BackgroundColor à Transparent.
Dans Word, j'Excel. (juste pour la citation)
VB (6, .NET1&2), C++, C#.Net1
Mon site