|
-
Jan 4th, 2012, 12:39 AM
#10
Addicted Member
Re: [vb6]Alpha Image Control (PNG, AniGIFs, TIFF, & more) [26 Nov 2011]
26 Nov 2011, version 2.1.29: Bug reports welcomed, enhancement requests will be considered
Well... your component is Excellent, no doubt... and I hope you'll consider my formal enhancement request below:
I'm not trying to turn your component into a Graphical Program. I'm trying to use it to replace the Vb6 PictureBox wich can't read PNG. I made some game in past that use the Vb6 Picture Box and some Bitblt call to add a small picture over a bigger picture. (I use 2 bitblt call and a mask to make it transparent)
I would like my game to be converted to use png instead of bmp.
It seem that everything I tried failed and I was wondering if adding a bitblt function that would use as input source a GDIpImage and as dest the component itself.
something like:
Code:
Public Function BitBltDc(ByVal plngPosX As Long, ByVal plngPosY As Long, ByVal plngWidth As Long, ByVal plngHeight As Long, ByVal phwnSrcDC As Long, ByVal plngSrcPosX As Long, ByVal plngSrcPosY As Long, ByVal dwRop As Long) As Long
Dim lngRetValue As Long
Dim lngDestDc As Long
Dim booWasSet As Boolean
booWasSet = False
If m_DC Is Nothing Then
Set m_DC = New cDeviceContext
booWasSet = True
End If
m_DC.UpdateDC True ' put 24bpp bitmap into DC & usercontrol to that DC
lngDestDc = m_DC.DC ' DC we use to paint on
lngRetValue = BitBlt(lngDestDc, plngPosX, plngPosY, plngWidth, plngHeight, phwnSrcDC, plngSrcPosX, plngSrcPosY, dwRop)
If (booWasSet <> False) Then
Set m_DC = Nothing
End If
BitBltDc = lngRetValue
End Function
I tried this, with and without refresh... the call to Bitblt is returning 1 (meaning it worked) but nothing appear on the image.
and voila, I plea guilty because I reeeeaaaaally would like you to help me out on this because I failed to make it work.
If you don't want to integreate this kind of function inside your component, I would understand, but some pointers to show me where I failed would be nice.
Bitblt is the only FAST drawing method that would solve all my problem (speed) using your component.
and the reason why I can't use separate image and overlay them like you did with the Clock Exemple, it's because I need to DRAG the image when I overlay too much component over, draging become slow. With Bitblt, the other image would be part of the current image and there will be no speed loss.

plzzzz!
btw, do you got a donation link ?
added:
Thanks for your answer... I rarely use stretch and never used rotation yet... but it's good to know...
dang I waited 2 hours for your answer and it was there but it was on a "new page" and I didn't saw it... pressing refresh every 5 minutes! lool...
Last edited by VbNetMatrix; Jan 4th, 2012 at 01:57 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|