我想提出兩個或多個重疊PictureBox
透明背景,但如果我這樣做我只看到一個圖片:重疊PicuresBox與透明背景
我創建這樣我PictureBox
ES:
PictureBox pb1 = new PictureBox();
pb1.Size = new Size(32, 32);
pb1.Location = new Point(0,0);
pb1.Image = Image.FromFile("../Graphics/Grounds/ground.png");
pb1.Visible = true;
PictureBox pb2 = new PictureBox();
pb2.Size = new Size(32, 32);
pb2.Location = new Point(0,0);
pb2.Image = Image.FromFile("../Graphics/Grounds/human.png");
pb2.Visible = true;
稍後我將這兩個PictureBox
es添加到我的Panel
:
panel1.Controls.Add(pb1);
panel1.Controls.Add(pb2);
那麼爲什麼它只顯示一個PictureBox
?
可能HTTP的副本:// stackoverflow.com/questions/5522337/c-sharp-picturebox-transparent-background-doesnt-seem-to-work –
看看這個答案:http://stackoverflow.com/a/9158849/838405 –