现在有一个图片,放在桌面上
 已经知道改图片得位置 LEFT ,TOP ,WIDTH,HEIGHT ,
请问如何将该图片复制后放在一个程序得PICTURE里面???很急!!
谢谢!!!!

解决方案 »

  1.   

    picture1.paintpicture picture2.picture,x1,y1,w1,h1,x2,y2,w2,h2
      

  2.   

    放在一个程序得PICTURE里面???
    详细点,具体啥意思?
      

  3.   

    解释一下:将picture2上的图片从(x2,y2)处复制宽w2高h2的部分,到picture1的(x1,y1)处,并以宽w1高h1的新尺寸显示
      

  4.   

    截屏 程序,可能对楼主有用
    Option ExplicitPrivate Type POINTAPI
        x As Long
        y As Long
    End Type
    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 Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hDC As Long) As Long
    Private Sub Command1_Click()
        Dim hDC As Long, nWidth As Integer, nHeight As Integer, nScreenWidth As Integer, nScreenHeight As Integer
        Me.Hide
        DoEvents
        Picture1.AutoRedraw = True
        hDC = GetDC(0)
        nScreenWidth = Screen.Width
        nScreenHeight = Screen.Height
        Picture1.Width = nScreenWidth
        Picture1.Height = nScreenHeight
        nWidth = nScreenWidth / Screen.TwipsPerPixelX
        nHeight = nScreenHeight / Screen.TwipsPerPixelY
        BitBlt Picture1.hDC, 0, 0, nWidth, nHeight, hDC, 0, 0, vbSrcCopy
        Me.Show
        ReleaseDC 0, hDC
        Picture1.AutoRedraw = False
    End Sub
      

  5.   

    谢谢!!baoaya(点头) !!谢谢各位!!
    给分!!