Results 1 to 2 of 2

Thread: BitBlt

  1. #1

    Thread Starter
    Lively Member TB's Avatar
    Join Date
    Feb 2001
    Location
    Austria
    Posts
    106

    Question

    Hi.

    I want to know, how to use the BitBlt Call.
    What exactly does this Call do?
    mojo

  2. #2
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Simplest Example, put 2 picture boxes and command button on a form...

    Code:
    Option Explicit
    Private Declare Function BitBlt Lib "gdi32" (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
    
    Private Sub Command1_Click()
        BitBlt Picture2.hDC, 0, 0, Picture1.Width / Screen.TwipsPerPixelX, Picture1.Height / Screen.TwipsPerPixelY, Picture1.hDC, 0, 0, vbSrcCopy
        Picture2.Refresh
    End Sub
    
    Private Sub Form_Load()
        Picture1.AutoRedraw = True
        Picture2.AutoRedraw = True
        Set Picture1.Picture = LoadPicture("C:\Windows\Forest.bmp")
    End Sub
    Search this forum on BitBlt, this API call has been discussed in great detail numerous times, and Good Luck!
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

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