BBC BASIC for Windows
Programming >> User Interface >> Transparent that ain't
http://bb4w.conforums.com/index.cgi?board=ui&action=display&num=1433014372

Transparent that ain't
Post by KenDown on May 30th, 2015, 7:32pm

I've written a simple program that sets a transparent window over the top of the screen. You can draw on this transparent window to enhance or highlight whatever is on the screen beneath it - a PowerPoint presentation, for example. You have to declare one colour to be the transparent colour, which I set to be COLOUR1 - dark red.

The problem is that when I use SCREENSAVE to save the screen the transparent window is no longer transparent but comes out as a dark red rectangle - with whatever I have draw or scribbled on it, but whatever was underneath is, of course, not visible.

Anyone know a way of keeping the transparent window transparent?
Re: Transparent that ain't
Post by rtr2 on May 30th, 2015, 9:45pm

on May 30th, 2015, 7:32pm, KenDown wrote:
Anyone know a way of keeping the transparent window transparent?

Have you tried the methods listed at the Wiki? Failing that, does a conventional PrtScr snapshot work?

http://bb4w.wikispaces.com/Capturing+the+contents+of+a+window

Richard.

Re: Transparent that ain't
Post by KenDown on May 31st, 2015, 05:20am

No, I haven't. The problem isn't that I want to include a dialog box or any of the other things those procedures are supposed to deal with, but I can certainly try methods two and four (I don't particularly want the mouse pointer, as in method three).

Curiously, when I tried PrtScr I got the underlying screen but not what I had scribbled on top of it, yet when my son tried it, it all worked perfectly. I can only assume that PrtScr works differently in XP (which I am still using) and 8.1, which is what he has.
Re: Transparent that ain't
Post by rtr2 on May 31st, 2015, 07:03am

on May 31st, 2015, 05:20am, KenDown wrote:
No, I haven't. The problem isn't that I want to include a dialog box or any of the other things those procedures are supposed to deal with

What they are "supposed" to deal with is unimportant; they are window capture routines that may solve your problem. Try them anyway.

Quote:
I can only assume that PrtScr works differently in XP (which I am still using) and 8.1

That's possible. DWM introduces an extra 'layer' of buffering between an application and the screen which can introduce incompatibilities. For example my 'magnifier' application does not - and cannot be made to - run in Windows 8/8.1 sad

Sadly if PrtScr fails in XP then any method you try may fail too. Another nail in the coffin for that OS.

Richard.