Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
C# Graphics CopyFromScreen issue
I have a DX scrolling banner running at the bottom of the desktop. The banner renders, as its backbround, anything beneath it. The problem is that if the background is renewed, I get a copy of the scrolling banner as its own background, even though I've made it invisible before using "CopyFromScreen". I'm probably being an idiot and it maybe obvious to others. Many thanks in advance.
RECT rct = new RECT();
GetWindowRect((IntPtr)SBHnd, ref rct);
Bitmap bmp = new Bitmap(PanWidth, PanHeight);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(rct.x, rct.y, 0, 0, new Size(rct.Width, rct.Height));