Arno's Blog

Arno Vyncke's Blog at vbCity
This blog hosted by:
http://blogs.vbcity.com

Windows 98 Fading Form

Posted on Tuesday, March 22, 2005 8:35 PM

Even though make a fading form in Win2K or WinXP is fairly easy, it is not in Win98. In Win98, we cannot use the SetLayeredWindowAttributes API, which makes it *impossible*.
The last couple of days, during my breaks, I had a look into this, as I would like a fading form in Win98, it's just a nice effect. So after some fooling around with the AlphaBlend API, I came up with a way.
But the problem was the AlphaBlend API wasn't able to do the job, I kept getting a "Cannot create AutoRedraw image". After searching a while on this error, I found out there was no solution to it...

So I remembered I had downloaded a DLL one day, that also provided AlphaBlend functions. So I went looking for it. After I found it, I tried it again, to no avail. But the supplied example WAS working...
After another bit of fooling around, I finally got it to work.

I now have a fading form, actually meant to show a splash screen (image only that is), but maybe some minor/major improvements later on. I'm just happy I created something like that.
The next step would be making it translucent, but it seems a lot harder as I am working with images right now, and I just capture the desktop, and let it blend with my picture, but the background changes constantly, so I would have to capture the desktop each and every second. That is a job that "can't" be done. But I'll see where I end up.