⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bmp2code.frm

📁 将BMP文件转换成C代码
💻 FRM
📖 第 1 页 / 共 5 页
字号:
   Begin VB.Label Label24 
      Caption         =   "B0"
      Height          =   255
      Left            =   5880
      TabIndex        =   60
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label23 
      Caption         =   "B1"
      Height          =   255
      Left            =   5280
      TabIndex        =   59
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label22 
      Caption         =   "B2"
      Height          =   255
      Left            =   4680
      TabIndex        =   56
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label21 
      Caption         =   "B3"
      Height          =   255
      Left            =   4080
      TabIndex        =   55
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label20 
      Caption         =   "B4"
      Height          =   255
      Left            =   3480
      TabIndex        =   52
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label19 
      Caption         =   "B5"
      Height          =   255
      Left            =   2880
      TabIndex        =   51
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label18 
      Caption         =   "B6"
      Height          =   255
      Left            =   2280
      TabIndex        =   48
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label17 
      Caption         =   "B7"
      Height          =   255
      Left            =   1680
      TabIndex        =   47
      Top             =   6480
      Width           =   375
   End
   Begin VB.Label Label_B8 
      Caption         =   "B8"
      Height          =   255
      Left            =   5880
      TabIndex        =   44
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B9 
      Caption         =   "B9"
      Height          =   255
      Left            =   5280
      TabIndex        =   43
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B10 
      Caption         =   "B10"
      Height          =   255
      Left            =   4680
      TabIndex        =   40
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B11 
      Caption         =   "B11"
      Height          =   255
      Left            =   4080
      TabIndex        =   39
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B12 
      Caption         =   "B12"
      Height          =   255
      Left            =   3480
      TabIndex        =   36
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B13 
      Caption         =   "B13"
      Height          =   255
      Left            =   2880
      TabIndex        =   35
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B15 
      Caption         =   "B15"
      Height          =   255
      Left            =   1680
      TabIndex        =   31
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label_B14 
      Caption         =   "B14"
      Height          =   255
      Left            =   2280
      TabIndex        =   30
      Top             =   7080
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label8 
      Height          =   255
      Left            =   6480
      TabIndex        =   22
      Top             =   6240
      Width           =   495
   End
   Begin VB.Label Label7 
      Height          =   255
      Left            =   7080
      TabIndex        =   21
      Top             =   6240
      Width           =   495
   End
   Begin VB.Label Label_colre 
      Height          =   255
      Left            =   8640
      TabIndex        =   20
      Top             =   6960
      Width           =   1455
   End
   Begin VB.Label Label_picsize 
      Height          =   255
      Left            =   8640
      TabIndex        =   19
      Top             =   6600
      Width           =   1455
   End
   Begin VB.Label Label_filesize 
      Height          =   255
      Left            =   8640
      TabIndex        =   18
      Top             =   6240
      Width           =   1455
   End
   Begin VB.Label Label6 
      Caption         =   "色彩:"
      Height          =   255
      Left            =   8040
      TabIndex        =   17
      Top             =   6960
      Width           =   495
   End
   Begin VB.Label Label5 
      Caption         =   "图片大小:"
      Height          =   255
      Left            =   7680
      TabIndex        =   16
      Top             =   6600
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "文件大小:"
      Height          =   255
      Left            =   7680
      TabIndex        =   15
      Top             =   6240
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "输出文件名:"
      Height          =   255
      Left            =   120
      TabIndex        =   12
      Top             =   480
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "输入文件名:"
      Height          =   255
      Left            =   120
      TabIndex        =   10
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "图片预览:"
      Height          =   255
      Left            =   7080
      TabIndex        =   8
      Top             =   900
      Width           =   1095
   End
End
Attribute VB_Name = "re"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim c16_mask_tab(0 To 15) As Long
Dim infilename As String
Dim outfilename As String
Dim file_sel As Byte
Dim PicNameF As Byte                '是否在数据前加图片名称
Dim file_out_format As Byte         '0=c,1=asm,2=bin
Dim outfilename_en As Byte          '=1:已输入输出文件名
Dim infile_no As Byte               '打开的文件号
Dim outfile_no As Byte              '输出文件号
Dim cu1 As Long                     '写入计数器
Dim StructSet As Byte               '在C语言时是否生成结构?
Dim color_format As Byte            '输出彩色格式:
                                    '0:黑白
                                    '1:4级灰度
                                    '2:16级灰度
                                    '3:8位色彩
                                    '4:16位色彩
Dim array_format As Byte            '在C语言时数组格式:
                                    '0:1维数组
                                    '1:2维数组
Dim ico As Byte                     '生成图标文件
'数据Bit位设置:
'彩色模式:
'   0=R6
'   1=R5
'   2=R4
'   3=R3
'   4=R2
'   5=R1
'   6=G6
'   7=G5
'   8=G4
'   9=G3
'   10=G2
'   11=G1
'   12=B6
'   13=B5
'   14=B4
'   15=B3
'   16=B2
'   17=B1
'黑白模式:
'   0=vd0
'   1=vd1
'   2=vd2
'   3=vd3
'   4=vd4
'   5=vd5
'   6=vd6
'   7=vd7
'

Dim bit15 As Byte
Dim bit14 As Byte
Dim bit13 As Byte
Dim bit12 As Byte
Dim bit11 As Byte
Dim bit10 As Byte
Dim bit9 As Byte
Dim bit8 As Byte
Dim bit7 As Byte
Dim bit6 As Byte
Dim bit5 As Byte
Dim bit4 As Byte
Dim bit3 As Byte
Dim bit2 As Byte
Dim bit1 As Byte
Dim bit0 As Byte

Dim bit7_c8 As Byte
Dim bit6_c8 As Byte
Dim bit5_c8 As Byte
Dim bit4_c8 As Byte
Dim bit3_c8 As Byte
Dim bit2_c8 As Byte
Dim bit1_c8 As Byte
Dim bit0_c8 As Byte
Dim bit_c8_change As Byte     '8位色位设置是否改变:1=改变

Dim bit15_c16 As Byte
Dim bit14_c16 As Byte
Dim bit13_c16 As Byte
Dim bit12_c16 As Byte
Dim bit11_c16 As Byte
Dim bit10_c16 As Byte
Dim bit9_c16 As Byte
Dim bit8_c16 As Byte
Dim bit7_c16 As Byte
Dim bit6_c16 As Byte
Dim bit5_c16 As Byte
Dim bit4_c16 As Byte
Dim bit3_c16 As Byte
Dim bit2_c16 As Byte
Dim bit1_c16 As Byte
Dim bit0_c16 As Byte
Dim bit_c16_change As Byte     '16位色位设置是否改变:1=改变
Dim WriteBuf(128) As Byte
Dim WrBufCnt As Byte


'end





Private Sub Che_struct_Click()
If Che_struct.Value = 1 Then
    StructSet = 1
Else
    StructSet = 0
End If
SaveSetting "BMP2CODE", "Format", "StructSet", StructSet
End Sub

Private Sub Check_ico_Click()
If Check_ico.Value = 1 Then
    ico = 1
Else
    ico = 0
End If
SaveSetting "BMP2CODE", "Format", "ico", ico
    
End Sub

Private Sub Check_PicName_Click()
    If Check_PicName.Value Then
        Label10.Visible = True
        Txt_PicName.Visible = True
        PicNameF = 1
    Else
        Label10.Visible = False
        Txt_PicName.Visible = False
        PicNameF = 0

    End If
    SaveSetting "BMP2CODE", "Format", "PicNameF", PicNameF

End Sub

Private Sub Combo_B0_Click()
    bit0 = Combo_B0.ListIndex
    Select Case color_format
    Case 3:
        bit_c8_change = 1
        bit0_c8 = bit0
    Case 4:
        bit_c16_change = 1
        bit0_c16 = bit0
    End Select
    Call Save_set

End Sub

Private Sub Combo_B1_Click()
    bit1 = Combo_B1.ListIndex
    Select Case color_format
    Case 3:
        bit_c8_change = 1
        bit1_c8 = bit1
    Case 4:
        bit_c16_change = 1
        bit1_c16 = bit1
    End Select
    Call Save_set
End Sub

Private Sub Combo_B2_Click()
    bit2 = Combo_B2.ListIndex
    Select Case color_format
    Case 3:
        bit_c8_change = 1
        bit2_c8 = bit2
    Case 4:
        bit_c16_change = 1
        bit2_c16 = bit2
    End Select
    Call Save_set
End Sub

Private Sub Combo_B3_Click()
    bit3 = Combo_B3.ListIndex
    Select Case color_format
    Case 3:
        bit_c8_change = 1
        bit3_c8 = bit3
    Case 4:
        bit_c16_change = 1
        bit3_c16 = bit3
    End Select
    Call Save_set

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -