Results 1 to 39 of 39

Thread: [Vb6] AlphaBlend API function(strange result)

Threaded View

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,961

    [Vb6] AlphaBlend API function(strange result)

    look these lines in UC:
    Code:
     'these if is for be changed
        If blnTransparentImage = True Then
            Dim BF As Long
            Const USE_BITMAP_ALPHA = &H1000000 'AC_SRC_ALPHA scaled up to the 4th byte of a long
            BF = 128 * &H10000  'semi transparent ignoring bitmaps alpha channel
            BF = 255 * &H10000 Or USE_BITMAP_ALPHA 'fully opaque using bitmaps alpha channel
            picGraphicsEffects.Picture = UserControl.Image
            AlphaBlend UserControl.hdc, 0, 0, UserControl.ScaleWidth, UserControl.ScaleHeight, picGraphicsEffects.hdc, 0, 0, picGraphicsEffects.ScaleWidth, picGraphicsEffects.ScaleHeight, BF
        End If
        'the next line is need too... when the shadow is desactivated
        UserControl.Picture = UserControl.Image
        PicAnimation(0).Tag = ""
        Call SubTransparent 'these sub is for put 1 color(backcolor) hide
        RaiseEvent ChangeImage(lngActualSubImage)
    and theres the result(in image)....
    why these strange result?
    can anyone help?
    thanks
    Attached Images Attached Images  
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width