研究了一天PaintPicture没搞定,望各路高手能指点迷津啊?

解决方案 »

  1.   

    Option ExplicitPrivate 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 Const SRCCOPY = &HCC0020 ' (DWORD) dest = source'Picture1为源图形,PICTURE2为目的图形
    Private Sub Command1_Click()
        Picture2.Width = Picture1.Width: Picture2.Height = Picture1.Height
        BitBlt Picture2.hDC, 0, 0, Picture1.Width, Picture1.Height, Picture1.hDC, 0, 0, SRCCOPY
        SavePicture Picture2.Image, "C:\aa.bmp"
    End SubPrivate Sub Form_Load()
        Picture2.AutoRedraw = True
    End Sub
      

  2.   

    To:cuizm(射天狼),偶把你的代码copy过去,保存的图像是空的,没把源picture1里的东东copy过去哦,你的qq号多少.
      

  3.   

    问题解决了,非常感谢cuizm(射天狼) 的帮助啊.