0
我目前正試圖把筆記放在工作人員圖像的頂部。但是,備註背景正在設置爲表單背景,如圖所示。 使用的圖像類型是PNG。c#覆蓋另一個圖像
//class music staff
public MusicStaff(int xLoc, int yLoc, int xSize, int ySize)
{
this.SetBounds(xLoc, yLoc, xSize, ySize);
this.Visible = true;
ResourceManager rm = Resources.ResourceManager;
Bitmap bmp = (Bitmap)rm.GetObject("Staff1");
this.BackgroundImage = bmp;
this.BackgroundImageLayout = ImageLayout.Stretch;
this.BackColor = Color.White;
//adding the background pic
panel4 = new MusicStaff(3, 62, 927, 150);
//adding a note
MusicNote p = new MusicNote(pitch, duration, shape, s);
p.SizeMode = PictureBoxSizeMode.StretchImage;
p.BackColor = Color.Transparent;
p.Size = new Size(50, 75);
p.Location = new Point(xCounter + starterX, NoteLocations.c0.mainPoint);
Bitmap myImage = (Bitmap)rm.GetObject(shape);
p.Image = myImage;
發表任何代碼,因此每個人都可以知道從哪裏開始幫助 –
ok代碼已添加 – christine
該代碼看起來有點被截斷,這通常很好,但在這種情況下,我需要更多一點才能獲得一些更多的上下文,看看究竟發生了什麼。 –