Form Transparent areas, regions and Windows 2000

G

Guest

Hi,

I'm implementing irregular shaped Windows Forms using the Region property in
..Net 2.0 (I'm not using TransparentKey to account for color depths > 16bpp)

I build the region mask adding 1 pixel high rectangles until all the area I
want to be transparent is covered (this tecnique is presented in several
Internet sites)

Everything works perfectly in XP and Vista. But not in Windows 2000. In
Win2K some areas (not all) of the transparent mask seem to be ignored. I have
compared the list of rectangles built in XP and 2000, and the region is built
exactly the same way. For some reason, Win2K (SP4) renders it differently
than what it should.

Does anyone know of any way to fix this?


Thanks,
Antonio
 
G

Guest

I dont know the answer to the question as I never used this technique on
Windows 2000 but I had it working on NT4 and XP.
One piece of advise though is to not use rectangles 1x1 pixel but make them
as wide as you can by looking ahead before to add/remove them from the
region. You may be doing this already but I thought i'd mention it as I used
to get exceptions occasionaly when using 1x1 rectangles
 
G

Guest

Thanks Ciaran. I'm in fact doing that already.

It's interesting also that you say it works on NT, I haven't tested it but
somehow I expected that the behaviour in NT would be the same as Win2K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top