Drawing and moving a Character Transparently (Not a Sprite)

Discussion in 'Questions (Windows Mobile)' started by Drewpeu, Oct 7, 2008.

  1. Drewpeu

    Drewpeu Member Licensed User


    In all the Libraries that come with Basic4ppc and the large ammount that
    users have contributed can the following be implemented from VB6!

    Public Sub drawHero()
    BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.Hero.hDC, 0, 0, vbSrcPaint
    End Sub

    Public Sub drawMask()
    BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.HeroMask.hDC, 0, 0, vbSrcAnd
    End Sub

    Public Sub drawBground()
    BitBlt frmBitBlt.hDC, 50, 50, 300, 300, frmBitBlt.Land.hDC, 0, 0, vbSrcCopy
    End Sub

    This can be used to Draw and move a character Transparently on a
    complex background.

    Thanks in advance.
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Drewpeu

    Drewpeu Member Licensed User

    Thanks Erel,

    I already downloaded and tried the Smiley example and found it
    very flickery, also as I added other images the flickering got worse!

    I also think the ammount of code/math required adds to this flickering.

    rectSrc.New1(0,0,bmp.Width,bmp.Height) 'The source rectangle.
    rectDest.New1(120,120,30,30) 'The target rectangle.

    All this for one image!
    This is what slows everything up I think.

    I require 36 images on the screen at any one time!

    What would be involved in creating a BitBlt library for Basic4ppc
    based on the VB.NET.Auto Function BitBlt Lib "GDI32.DLL"

    Thanks once again for all your help...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice