本人想做一软件预想让扫描仪输入进来的图片以实际大小显示
如何办到

解决方案 »

  1.   

    用IMAGE控件,STRATCH属性设为FALSE,加载该图片后控件的大小就是图片的大小
      

  2.   

    Private Declare Function GetObjectAPI Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As LongPrivate Type BITMAP
        bmType As Long
        bmWidth As Long
        bmHeight As Long
        bmWidthBytes As Long
        bmPlanes As Integer
        bmBitsPixel As Integer
        bmBits As Long
    End Type    Dim bm As BITMAP
        Call GetObjectAPI(pic.Picture, Len(bm), bm)
        frmBrowse.Label1 = "大小 : " & bm.bmWidth & "×" & bm.bmHeight