I am currently working on a project where I need to use GDI + ( System.Drawing ). I am trying to make a multi-purpose meter (clock wheel) with dynamic neons on it.
I do not want to draw a background image (with all marks) in each frame. I solved it right now by setting it as the background image of the graphic βcontainerβ, which is a panel (remember this, I probably should do it differently).
So, I am drawing needles. The needle is updated 25 times per second (I could optimize this so that it is updated only when necessary). However, the problem is that I have to clear the buffer before starting to work with the new frame, causing the background image to become covered by the background color of the buffer. Obviously, I do not want this.
I tried to set the background color of the buffer to Color.Transparent , but instead it gives the buffer a color according to the parent transparency key (in my case it is black).
Here is my current code used to draw needles (in the Wheel class):
Yes, I followed the rules, I did my homework. Other people have solved this by simply drawing an image in each frame using BitBlt, which is a way to advance for understanding my brain.
I am very frank about this, so if you think I should use BitBlt anyway, and you know where I can find some detailed detailed examples, I will definitely do it with BitBlt. Of course, it would be even better if there were solutions without using BitBlt, or if it makes no sense to use it here anyway.
Is it possible to make the buffer buffer transparent or should I use a completely different approach?
Note. I prefer not to use XNA, since this application will be mainly used for maintenance on simple / old computers, so I do not want to have anything to do with redistributable ones.