x,y ------------  Long,逻辑坐标中要检查的点像素

解决方案 »

  1.   

    是像素它不由ScaleMode的选择决定
      

  2.   

    那这样的话我如何把picture1的图片拷到picture2中?  
    For lTempX = 0 To Picture1.Width - 1
            For lTempY = 0 To Picture1.Height - 1
               lTempRGB = GetPixel(Picture1.hdc, lTempX, lTempY)
               SetPixel Picture2.hdc, lTempX, lTempY, lTempRGB 
            Next
        Next办不到,因为picture1.width的单位为提,如何办?
      

  3.   

    Me.MousePointer = 11
        Dim fColor As Long
        For y = 0 To Picture1.Height Step 5
        For x = 0 To Picture1.Width Step 5
           fColor = Picture1.Point(x, y)
           Picture2.PSet (Picture2.Width - x - 60, y), fColor
        Next x
        Next y
        Me.MousePointer = 0
      

  4.   

    方法1:设置picture1的ScaleMode为 3 - VbPixels
      可按你的代码直接使方法2:将代码改动一下For lTempX = 0 To Picture1.Width/Screen.TwipsPerPixelX - 1 
      For lTempY = 0 To Picture1.Height/Screen.TwipsPerPixelY - 1 
        lTempRGB  =  GetPixel(Picture1.hdc,  lTempX,  lTempY) 
        SetPixel  Picture2.hdc,  lTempX,  lTempY,  lTempRGB  
      Next 
    Next
      

  5.   

    5提=1像素?
    泰山,你的我基本看明白了,可是我想用像素操作,没办法吗?
    Picture2.Width  -  x  -  60  什么意思?
    x,y的坐标原点不在左上角?
      

  6.   

    设置picture1的ScaleMode为  3  -  VbPixels 
    设置picture2的ScaleMode为  3  -  VbPixels 
    autoredraw 设置为 falseFor  lTempX  =  0  To  Picture1.scaleWidth  -  1 
         For  lTempY  =  0  To  Picture1.scaleHeight  -  1 
             lTempRGB  =  GetPixel(Picture1.hdc,  lTempX,  lTempY) 
             SetPixel  Picture2.hdc,  lTempX,  lTempY,  lTempRGB  
         Next 
    Next
      

  7.   

    这样不就行了:
    Pic1.PaintPicture Pic2.Picture,0,0