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

📄 led_maker.frm

📁 LED 数码管学习程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form LED_MAKER 
   BackColor       =   &H80000007&
   Caption         =   "LED编码器 -- Dellric"
   ClientHeight    =   4905
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6600
   LinkTopic       =   "Form1"
   ScaleHeight     =   4905
   ScaleWidth      =   6600
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   465
      Left            =   3420
      TabIndex        =   9
      Top             =   2250
      Width           =   1725
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   465
      Left            =   3420
      TabIndex        =   8
      Top             =   1170
      Width           =   1725
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "dp"
      Height          =   285
      Index           =   7
      Left            =   2250
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   2700
      Width           =   285
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "g"
      Height          =   285
      Index           =   6
      Left            =   900
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   1530
      Width           =   915
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "f"
      Height          =   1005
      Index           =   5
      Left            =   540
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   630
      Width           =   285
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "e"
      Height          =   1005
      Index           =   4
      Left            =   540
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1710
      Width           =   285
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "d"
      Height          =   285
      Index           =   3
      Left            =   810
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2700
      Width           =   1095
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "c"
      Height          =   1005
      Index           =   2
      Left            =   1890
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1710
      Width           =   285
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "b"
      Height          =   1005
      Index           =   1
      Left            =   1890
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   630
      Width           =   285
   End
   Begin VB.CommandButton Seg 
      BackColor       =   &H00FFFFFF&
      Caption         =   "a"
      Height          =   285
      Index           =   0
      Left            =   810
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00000000&
      Caption         =   "十六进制码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFF80&
      Height          =   375
      Index           =   1
      Left            =   3420
      TabIndex        =   11
      Top             =   1800
      Width           =   1815
   End
   Begin VB.Label Label1 
      BackColor       =   &H00000000&
      Caption         =   "十进制码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFF80&
      Height          =   375
      Index           =   0
      Left            =   3420
      TabIndex        =   10
      Top             =   720
      Width           =   1815
   End
End
Attribute VB_Name = "LED_MAKER"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Text1.Text = LTrim(Str(0))
    Text2.Text = LTrim(Hex(0))
End Sub

Private Sub Seg_Click(Index As Integer)
    Dim i As Integer
    Dim t As Integer
    If (Seg(Index).BackColor = &HFFFFFF) Then
        Seg(Index).BackColor = &HFF
    Else
        Seg(Index).BackColor = &HFFFFFF
    End If
    t = 0
    For i = 0 To 7
        If Seg(i).BackColor = &HFF Then
            t = t + 2 ^ i
        End If
    Next i
    Text1.Text = LTrim(Str(t))
    Text2.Text = LTrim(Hex(t))
End Sub

⌨️ 快捷键说明

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