Hi i am trying to make a panel that will show some text when it hovered over a picture and i want it to follow the cursor so i
System.Windows.Forms.Panel pan = new System.Windows.Forms.Panel();
public Form1()
{
InitializeComponent();
Product p = new Product();
p.SetValues();
this.pictureBox1.Image = (Image)Properties.Resources.ResourceManager.GetObject("pictureName");
}
private void pictureBox1_MouseEnter(object sender, EventArgs e)
{
pan.Height = 200;
pan.Width = 100;
pan.BackColor = Color.Blue;
this.Controls.Add(pan);
pan.BringToFront();
//pan.Location = PointToClient(Cursor.Position);
}
private void pictureBox1_MouseLeave(object sender, EventArgs e)
{
Controls.Remove(pan);
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
pan.Location = PointToClient(Cursor.Position);
}
I tried adding this.doublebuffered = true;
but it just make it look like there are after image of the panel when i move my mouse
when i hover over my picture it shows the panel but it flickers like crazy is this normal or is there a fix for this or this is my computers problem