Custom-shaped windows using PNGs in VB Express

Hey!

I'm trying to figure out how to draw a custom-shaped window from a PNG file, using transparency from the PNG. This is a cinch to do in Cocoa, but I can't figure out how to do it in VB. I'm using VB Express, if it matters.

Also, if someone can show me how to draw buttons with PNG transparency, that's welcome as well.

Thanks!

John

#276030

In windows? I dont think windows has native support for alpha blending pngs. I think your gonna have to build your own libaiers. :/

As for the custom shaped windows...Sorry.

#276175

i had searched for the same abilities for quite some time, and finally came across some helpful sites...

here is an easy way to get regions automatically from a bmp:

http://www.vbrad.com/pf.asp?p=source/src_r...ip_advanced.htm

i suppose you could load a png image as a bitmap, but you wont get alpha transparency with this.

there is an example floating around the internet thats called perpixeltest... try to google it... it was originally written in c# but was converted to vb.net... but there a few problems that i can come across while using the code like you cant draw any controls on the png based form (or at least i havent figured out how to)

if i come across the source code for the perpixeltest stuff, ill try to attack it here, or email it to you.

if you can figure out how to draw controls on a png based form, it would be excellent if you would share it with me and the rest of us... i know i could use it for a few things.

also, check out these links, they may shed some light on some problems:

http://www.dotnetforums.net/showthread.php...3&mode=threaded

http://www.xtremedotnettalk.com/showthread...highlight=alpha.

#276279