acido00 Posted February 5, 2006 Share Posted February 5, 2006 The title say all! please help me! I want Insert Image .png in Visual Basic 6 support the transparency Link to comment Share on other sites More sharing options...
0 acido00 Posted February 5, 2006 Author Share Posted February 5, 2006 nobody :( Link to comment Share on other sites More sharing options...
0 Lazereth Posted February 5, 2006 Share Posted February 5, 2006 Ok - firstly if you are using the IDE make sure that the background property of the BMP is marked transparent - otherwise you end up with a background property of the colour defined in "Background Color". If you are trying to do this over the desktop, you have alot more to deal with than this. Secondly if you are doing this is code. Create a new object, type Picture and use the load command to load the file into the frame, cast this onto your form and voila! PNG supports transparency directly and so the frame you are using will automatically display what is underneath it. Be aware that if you want to move this, you`ll need some form of double-buffering over the frame below as PNG consumes ALOT of resources since it is more a vector drawing than a bitmap. Regards Lazereth Link to comment Share on other sites More sharing options...
0 jokeripa Posted February 5, 2006 Share Posted February 5, 2006 Why are you so intent on the .png extension, when you could do it much easier? Also, spot on Lazereth! Link to comment Share on other sites More sharing options...
0 acido00 Posted February 5, 2006 Author Share Posted February 5, 2006 .png support transparency with 32bits, but .gif only 256 colors Link to comment Share on other sites More sharing options...
0 acido00 Posted February 5, 2006 Author Share Posted February 5, 2006 where can i define the background BMP file? Link to comment Share on other sites More sharing options...
0 The_Decryptor Veteran Posted February 5, 2006 Veteran Share Posted February 5, 2006 Few things. 1. VB6 doesn't support PNG images, you have to use something else (like a library or so) to do the drawing, i found one a while back that was really fast, but had issues with interlaced images. 2. PNG isn't a "vector" image, it's a raster. Link to comment Share on other sites More sharing options...
0 Rob Veteran Posted February 5, 2006 Veteran Share Posted February 5, 2006 Few things. 1. VB6 doesn't support PNG images, you have to use something else (like a library or so) to do the drawing, i found one a while back that was really fast, but had issues with interlaced images. 2. PNG isn't a "vector" image, it's a raster. Spot on. That's one of the numerous benefits of the .NET framework - superior graphics support with alpha channels in PNG. Link to comment Share on other sites More sharing options...
0 acido00 Posted February 5, 2006 Author Share Posted February 5, 2006 Yeap.. but what is the DLL? Link to comment Share on other sites More sharing options...
0 The_Decryptor Veteran Posted February 5, 2006 Veteran Share Posted February 5, 2006 Try this one http://www.vbaccelerator.com/home/VB/Code/...les/article.asp It allows VB6 to hook into GDI+ image handling (what .NET's System.Drawing allows.) Link to comment Share on other sites More sharing options...
Question
acido00
The title say all! please help me!
I want Insert Image .png in Visual Basic 6
support the transparency
Link to comment
Share on other sites
9 answers to this question
Recommended Posts