I have a problem because I wish to put a PictureBox on top of a Panel which is drawn as a Piano Stave. The Problem that I am having is when using .Transparent it is just giving me the Control colour form which is incorrect having a stave with lines across. What can I do?
EDIT:
How does the code need to be written to make everything as a Panel, Hans ? Code: How does the code need to be written to make everything as a Panel, Hans ?
Code:
class MusicNote : PictureBox
{
public string path = "ImagesName\\";
public string noteShape = "";
public int time = 0;
public MusicNote(int iTime, string iNoteShape, int x, int y) : base()
{
noteShape = iNoteShape;
time = iTime;
Enabled = true;
Location = new Point(x, y);
Size = new Size(35, 35);
Image NoteBmp = Image.FromFile(path + noteShape + ".png");
Image = NoteBmp;
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
}
}
The only thing that must be done added in the main form is to add the controls of the PictureBox with those to the Panel.