Results 1 to 8 of 8

Thread: BitBlt: Problem converting vb6 to vb.net

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    170

    BitBlt: Problem converting vb6 to vb.net

    this is the API call:
    Code:
    Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As IntPtr, _
     ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, _
     ByVal nHeight As Long, ByVal hSrcDC As IntPtr, ByVal xSrc As Long, _
     ByVal ySrc As Long, ByVal dwRop As Long) As Long
    
     Public Const SRCCOPY = &HCC0020
     Public Const SRCPAINT = &HEE0086
     Public Const SRCAND = &H8800C6
    which i need to find an equivelent for vb.net.

    Code:
    RetVal = BitBlt(Form1.Picture1.hDC, XVal_To, YVal_To, Width, Height, Form1.Picture1.hDC, XVal_From, YVal_From, SRCAND)
    as you may have guessed, the is Form1 , with Picture1 as a picture box in it.
    the property "hDC" in picture1.hDC is removed !!!!!!!!!!
    what can i do ???!
    well, i tried to use:

    Code:
    Dim HDC1 as IntPtr
    HDC1=Form1.DefInstance.Picture1.CreatGraphics.GethDC
    'bla bla bla
    is that way right ??
    if it is, y it is not working ???

    as i have noticed (although not sure of how accurate this notice is)
    the thing draw for a second and is erased immediates (probably after re-painting)
    well, that doesnot happen in vb6 !!!!!

    anyone can help ????
    Last edited by ZaidGS; Aug 20th, 2003 at 07:01 PM.

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