Guidance
指路人
g.yi.org
software / rapidq / Examples / Graphics & Animation / bmpinfo / DemoProgram.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $TYPECHECK ON
     $INCLUDE "bmpinfo.inc"

     DECLARE SUB ReadInfo
     DECLARE SUB Changedir
     DIM bitmap AS Qbmpinfo

     CREATE Form AS QFORM
      center
      Width = 400
      height = 450
      font.name = "Verdana"
      borderstyle = 1
      delbordericons 2
      CAPTION = "BMP Inspector by Dreadsoft® Corporation"
      CREATE DT AS QDIRTREE
       left = 10
       top = 10
       width = 160
       height = 200
       Onchange = changedir
      END CREATE
      CREATE Fl AS QFILELISTBOX
       width = 300
       top = 10
       width = 200
       left = 180
       height = 120
       mask = "*.bmp"
       Onclick = Readinfo
      END CREATE
      CREATE INFOBOX AS QRICHEDIT
       top = 140
       left = 180
       height = 270
       width = 200
       font.name = "Courier New"
       wordwrap = 0
      END CREATE
      CREATE PALETTELABEL AS QLABEL
       left = 10
       top = 225
       CAPTION = "Palette"
      END CREATE
      CREATE PALETTEPANEL AS QPANEL
       width = 160
       height = 160
       borderstyle = 0
       top = 250
       left = 10
      END CREATE
     END CREATE

     Form.SHOWMODAL

     SUB changedir
      Fl.directory = DT.directory
     END SUB

     SUB ReadInfo
      Bitmap.OPEN Fl.filename
      Bitmap.Palette.PARENT = PalettePanel

      InfoBox.CLear
      InfoBox.addstrings "Signature       : " & Bitmap.Signature
      InfoBox.addstrings "FileSize        : " & STR$(Bitmap.FileSize    )
      InfoBox.addstrings "Reserved        : " & STR$(Bitmap.Reserved    )
      InfoBox.addstrings "DataOffset      : " & STR$(Bitmap.DataOffset    )
      InfoBox.addstrings "Size            : " & STR$(Bitmap.Size    )
      InfoBox.addstrings "Width           : " & STR$(Bitmap.Width    )
      InfoBox.addstrings "Height          : " & STR$(Bitmap.Height    )
      InfoBox.addstrings "Planes          : " & STR$(Bitmap.Planes    )
      InfoBox.addstrings "BitCount        : " & STR$(Bitmap.BitCount    )
      InfoBox.addstrings "Compression     : " & STR$(Bitmap.Compression    )
      InfoBox.addstrings "ImageSize       : " & STR$(Bitmap.ImageSize    )
      InfoBox.addstrings "XpixelsPerM     : " & STR$(Bitmap.XpixelsPerM    )
      InfoBox.addstrings "YpixelsPerM     : " & STR$(Bitmap.YpixelsPerM    )
      InfoBox.addstrings "ColorsUsed      : " & STR$(Bitmap.ColorsUsed    )
      InfoBox.addstrings "ColorsImportant : " & STR$(Bitmap.ColorsImportant    )
      InfoBox.addstrings "Numcolors       : " & STR$(Bitmap.Numcolors    )
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-27  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-21 16:34:49