I've searched the forums for over an hour and couldn't find an answer to my problem. Everytime I try to use .hDC on anything it says there isn't one. How do I go about fixing this? Here's my code: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 System.Int32) As Long Public Const SRCCOPY = &HCC0020 Public Const SRCPAINT = &HEE0086 Public Const SRCAND = &H8800C6 Public RetVal As Long Private Sub form2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint RetVal = BitBlt(Form1.hDC, 0, 0, 320, 200, Picture1.hDC, 0, 0, SRCCOPY)) End Sub




Reply With Quote