📄 bitmap.frm
字号:
VERSION 5.00
Object = "*\A..\SOURCE\FAST2002.vbp"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form frmBitmap
BorderStyle = 3 'Fixed Dialog
Caption = "Bitmap Information"
ClientHeight = 2790
ClientLeft = 45
ClientTop = 330
ClientWidth = 6405
Icon = "Bitmap.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2790
ScaleWidth = 6405
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdSelect
Caption = "Select Bitmap..."
Height = 465
Left = 4725
TabIndex = 0
Top = 2250
Width = 1545
End
Begin MSComDlg.CommonDialog dlgOpen
Left = 5760
Top = 1665
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DialogTitle = "Select a bitmap"
Filter = "Bitmap files|*.bmp|All files|*.*"
End
Begin FLWGraphMath.FWBitmap objBitmap
Left = 5160
Top = 1680
_ExtentX = 820
_ExtentY = 820
End
Begin VB.Image imgPreview
Height = 1500
Left = 4725
Stretch = -1 'True
Top = 90
Width = 1590
End
Begin VB.Label lblInfo
Height = 2580
Left = 90
TabIndex = 1
Top = 90
Width = 4350
WordWrap = -1 'True
End
End
Attribute VB_Name = "frmBitmap"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdSelect_Click()
dlgOpen.CancelError = False
dlgOpen.ShowOpen
If objBitmap.Create(dlgOpen.FileName) Then
imgPreview = LoadPicture(dlgOpen.FileName)
With objBitmap
lblInfo = dlgOpen.FileName & vbCrLf & _
.Width & "x" & .Height & " pixels" & vbCrLf & _
Format$(.Size, "#,###,###") & " bytes" & vbCrLf & _
.Planes & " planes" & vbCrLf & _
.Colors & " colors" & vbCrLf & _
.UsedColors & " used colors" & vbCrLf & _
.ImportantColors & " important colors" & vbCrLf
Select Case .Compression
Case FLWGraphMath.flwBitmapRGB
lblInfo = lblInfo & "Uncompressed bitmap" & vbCrLf
Case FLWGraphMath.flwBitmapRLE8
lblInfo = lblInfo & "Run-length encoded (RLE) format for bitmaps with 8 bits per pixel" & vbCrLf
Case FLWGraphMath.flwBitmapRLE4
lblInfo = lblInfo & "Run-length encoded (RLE) format for bitmaps with 4 bits per pixel" & vbCrLf
Case FLWGraphMath.flwBitmapBitfields
lblInfo = lblInfo & "Uncompressed 16 or 32 bits per pixel format" & vbCrLf
End Select
End With
Else
lblInfo = ""
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -