Results 1 to 5 of 5

Thread: bitblt-useage

  1. #1

    Thread Starter
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Angry

    I'm trying to move a the visible part of a picturebox by one line during each cycle(like scrolling), after that a new line is added to the picture box. Is that possible using BITBLT???
    Thanks

  2. #2
    Guest
    I cannot understand what you are trying to do. Are you trying to move a Picture in a direction little by little at a time? If so, yes you can do that with BitBlt

  3. #3

    Thread Starter
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Yes, that's my problem, but whow can I do it?

  4. #4
    Guest

    Declaration for module.
    Code:
    Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    But this code in a Timer. Make sure there is a PictureBox on the Form and also make sure that the SaleMode property for everything is set to Pixel.

    Code:
    Private Sub Timer1_Timer()
    
        Cls     ' Clear the Form's DC
        Static iLeft    ' Store the variable for left
        iLeft = iLeft + 10  ' Increase the Left variable by 10
        ' Blt the image
        BitBlt Form1.hDC, iLeft, 32, 32, 32, Picture1.hDC, 0, 0, SRCCOPY
    
    End Sub

  5. #5

    Thread Starter
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Talking

    Danke

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