[.net] Transparent Window?

Started by
4 comments, last by Dave Hunt 17 years, 4 months ago
I am writing a basic program to render a simple sprite to the screen with a blue background. The program compiled fine, but when it ran a window came up, the problem was that the window was completely transparent in that I could see the border of it fine, but the inside was showing exactly what was behind it be it the Visual Studio C# screen or my desktop, whatever. Any help on this matter would be greatly appreciated because it's been happening since I tried to render a blank window. Thanks in advance for any help you can offer.
Advertisement
If I'm understanding you correctly you don't want the border? If that's the case, just change the FormBorderstyle property of the window to None. If that's not the case, please explain what the problem is.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Could you post your render function? It's a bit hard to say what's going on without knowing what your code is doing.
i bet the window content does not change if you move the window. what is displayed depends on what was shown in the window's area right before the window itself had shown up

if that is the case, you need to switch the backbuffers.
for example, if you were using OpenGL you have to call glSwapBuffers() after each frame rendered
Quote:Original post by Tonni
i bet the window content does not change if you move the window. what is displayed depends on what was shown in the window's area right before the window itself had shown up

if that is the case, you need to switch the backbuffers.
for example, if you were using OpenGL you have to call glSwapBuffers() after each frame rendered


Yes, that's what's happening, but I'm using MDX 1.1, so what function do I need to call?
You should have a device.Clear() call followed by device.BeginScene(), device.EndScene(), and device.Present().

This topic is closed to new replies.

Advertisement