headkaze: I think the loop is my fault. If it gets an error trying to initialize the directx screen, it waits 4 seconds then tries again, but it only does it 3 times, then errors out. I put this in because it's in my startup folder, and the video card takes a few seconds to initialize once Windows starts. I don't know why it wouldn't work at all on your machine. Does other DirectX stuff work?
Space Fractal: I'm not sure how to check if the sprite has been corrupted. I'm checking for a NULL sprite before attempting to draw it, but for some reason, Windows seems to overwrite that chunk of memory with some garbage when you alt-tab. I don't want to reload the sprite each time I have to draw it, because that would really slow it down.
Youki: EBasic is a great language, and I've used a few. BASIC and 6502 asm on the Apple ][e, QBasic in Dos, Visual Basic, IBasic standard and professional, M$ Visual C in Windows, Onboard C, GCC and PocketC on the Palm, and now EBasic.
I've found Ebasic to be very simple and powerful. It's like a cross between Basic and C++ - with the simplicity of Basic, but the power of C++. It creates full compiled standalone exe and dll files (no runtimes), and is quite quick for prototyping. Supports classes and inheritance, 2d and 3d directX built in (OpenGL is available too - I had to use some OpenGL functions to read the png snapshots).
Worth learning I think.
Cheers all. Trying to fix the alt-tab problem, and not sure about the bad png, because mine all load fine.