i assume that you are using a timer and drawing the image each time the tick event fires and that's the reason of the flickering
So, first create a winform, i am putting the backColor to red so you can see the transparency of the background better
![enter image description here]()
Add one timer and turn on the tick event
Then choose an image with transparency in png, one like this:
![enter image description here]()
Put it in the directory where you start your application from
![enter image description here]()
Finally this is the code, it's fully functional, i tested already :v
using System;
using System.Collections.Generic;
using System.ComponentModel;
System.Data;
System.Drawing;
System.IO;
System.Linq;
System.Text;
System.Threading.Tasks;
System.Windows.Forms;
namespace so
{
public partial class Form1 : Form
{
Image image;
public Form1()
{
image = Image.FromFile("imagen.png");
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
Graphics gr = this.CreateGraphics();
BufferedGraphicsContext bgc = BufferedGraphicsManager.Current;
BufferedGraphics bg = bgc.Allocate(gr,this.ClientRectangle);
//before drawing the image clean the background with the current form's Backcolor
bg.Graphics.Clear(this.BackColor);
//use any overload of drawImage, the best for your project
bg.Graphics.DrawImage(image,0,0);
bg.Render(gr);
}
}
}
Maybe i didn't understand correctly your answer, but this will avoid the flickering and show one image with transparent background without any problem :)