AlphaImage Control - PNG Compatible [VB6]
A usercontrol, imitating VB's image control, that allows you to load PNGs and other image formats just by selecting the image. Several properties allow fine tuning the image, to include gray scaling, rotation, mirroring and more. Compatible with Win95 and up. It is highly recommended for use on WinXP & above, Win98 and above with GDI+ installed and/or zLIB.dll available. Both DLLs are free downloads and help support PNG creation. GDI+ if available allows TIFF images to be used. None are required, but having them improves performance quite a bit.
GDI+ can be downloaded from Microsoft (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlus.asp)
zLIB can be downloaded from their website (http://www.zlib.net/)
There are 2 projects in the zip, so unzip checking the "Use Folders" option. One project is the usercontrol only, ready to compile. The other is a test project that includes the usercontrol in it.
At top of the UserControl's code page is information where you can check for updates from time to time.
The image below are 3 PNGs, in 3 usercontrols, overlapping each other for effect.
60144
Updated 30Nov07. Shadows did not stretch when the image was stretched. Patched couple of minor bugs.
[1302 byte] By [
LaVolpe] at [2007-12-5 10:01:31]

# 2 Re: AlphaImage Control - PNG Compatible [VB6]
Compiled OCX related bug (minor). You will only experience this when the usercontrol is compiled to an OCX, then that OCX is added to a project and then that project is attempted to be compiled: Error is With Block Not Set.
Fix: In the UserControl's Terminate event:
Change:
cCrossTalker.RemoveRef ObjPtr(Me)
Set cCrossTalker = Nothing
To:
If Not cCrossTalker Is Nothing Then
cCrossTalker.RemoveRef ObjPtr(Me)
Set cCrossTalker = Nothing
End If
# 3 Re: AlphaImage Control - PNG Compatible [VB6]
Very good.
But i found little bug.
When i try to load control in array is loaded blank (no picture). WHY
I also try Image Control from vb6 and everything working good
sample code
For x = 1 To 500
Load imgTemp(x)
imgTemp(x).Left = x
imgTemp(x).Top = x
imgTemp(x).Visible = True
Next x
and i also try this and it's work, but very slow :cry:
For x = 1 To 500
Load imgTemp(x)
imgTemp(x).LoadImage_FromFile "c:\a.gif"
imgTemp(x).Left = x
imgTemp(x).Top = x
imgTemp(x).Visible = True
Next x
sase at 2007-12-6 10:41:14 >

# 4 Re: AlphaImage Control - PNG Compatible [VB6]
First, this is not an image control. But I will attempt to answer your questions. Additionally, you may want to spend a few minutes and review the Usage.RTF file provided, if you plan on using this control.
1. Your first example. Not a bug. I did not code the usercontrol for that capability
2. Your 2nd example. In my opinion, loading 500 images on a form is a waste of resources, but I do understand your point. The control was designed to provide something VB won't ... PNG & per-pixel alphablended image support. Additionally, uncompiled graphics-intensive routines within IDE almost always work slower than when they are compiled. Comparing this to the image control, regarding speed, really isn't a fair comparison. VB's image control doesn't have to handle alphablended images, rotation, and all the other options that this control provides. Therefore, it only needs to simply BitBlt to the screen. In the Usage.RTF file, I described that speed is a concern and how to minimize that concern.
# 6 Re: AlphaImage Control - PNG Compatible [VB6]
sase, the control is windowless, similar to a label, image control, line and shape controls. As such they cannot be placed over controls that have hWnds, but can be placed over other windowless controls.