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

📄 form1.frm

📁 显示屏测试程序的源程序
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      AutoBuddy       =   -1  'True
      BuddyControl    =   "TextVelocity"
      BuddyDispid     =   196638
      OrigLeft        =   2880
      OrigTop         =   2640
      OrigRight       =   3195
      OrigBottom      =   3015
      Max             =   9
      SyncBuddy       =   -1  'True
      BuddyProperty   =   65547
      Enabled         =   -1  'True
   End
   Begin VB.TextBox TextVelocity 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   1
      EndProperty
      Enabled         =   0   'False
      Height          =   375
      Left            =   840
      TabIndex        =   23
      Top             =   3720
      Width           =   660
   End
   Begin VB.Frame FrameFontType 
      Caption         =   "字体"
      Height          =   1575
      Left            =   1200
      TabIndex        =   18
      Top             =   840
      Width           =   1935
      Begin VB.OptionButton OptionFontType3 
         Caption         =   "英24*12 汉24*24"
         Height          =   255
         Left            =   120
         TabIndex        =   21
         Top             =   960
         Width           =   1695
      End
      Begin VB.OptionButton OptionFontType2 
         Caption         =   "英16*8  汉16*16"
         Height          =   255
         Left            =   120
         TabIndex        =   20
         Top             =   600
         Width           =   1695
      End
      Begin VB.OptionButton OptionFontType1 
         Caption         =   "英7*6"
         Height          =   255
         Left            =   120
         TabIndex        =   19
         Top             =   240
         Width           =   1695
      End
   End
   Begin VB.Frame FrameWindow 
      Caption         =   "位置"
      Height          =   1215
      Left            =   120
      TabIndex        =   9
      Top             =   2400
      Width           =   3015
      Begin VB.TextBox TextY1 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         Height          =   270
         Left            =   1560
         TabIndex        =   13
         Top             =   720
         Width           =   735
      End
      Begin VB.TextBox TextY0 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         Height          =   270
         Left            =   1560
         TabIndex        =   12
         Top             =   360
         Width           =   735
      End
      Begin VB.TextBox TextX1 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         Height          =   270
         Left            =   360
         TabIndex        =   11
         Top             =   720
         Width           =   735
      End
      Begin VB.TextBox TextX0 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         Height          =   270
         Left            =   360
         TabIndex        =   10
         Top             =   360
         Width           =   735
      End
      Begin VB.Label LabelY1 
         Caption         =   "Y1"
         Height          =   255
         Left            =   1320
         TabIndex        =   17
         Top             =   720
         Width           =   255
      End
      Begin VB.Label LabelY0 
         Caption         =   "Y0"
         Height          =   255
         Left            =   1320
         TabIndex        =   16
         Top             =   360
         Width           =   255
      End
      Begin VB.Label LabelX1 
         Caption         =   "X1"
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   720
         Width           =   255
      End
      Begin VB.Label LabelX0 
         Caption         =   "X0"
         Height          =   255
         Left            =   120
         TabIndex        =   14
         Top             =   360
         Width           =   255
      End
   End
   Begin VB.ListBox ListComm 
      Height          =   4920
      Left            =   5520
      TabIndex        =   8
      Top             =   360
      Width           =   5175
   End
   Begin VB.Frame Frame1 
      Caption         =   "命令类型"
      Height          =   2175
      Left            =   120
      TabIndex        =   2
      Top             =   240
      Width           =   975
      Begin VB.OptionButton OptionClear 
         Caption         =   "清屏"
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   1680
         Width           =   735
      End
      Begin VB.OptionButton OptionPause 
         Caption         =   "暂停"
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   1320
         Width           =   735
      End
      Begin VB.OptionButton OptionDate 
         Caption         =   "日期"
         Height          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   960
         Width           =   735
      End
      Begin VB.OptionButton OptionTime 
         Caption         =   "时间"
         Height          =   375
         Left            =   120
         TabIndex        =   4
         Top             =   600
         Width           =   735
      End
      Begin VB.OptionButton OptionText 
         Caption         =   "文字"
         Height          =   375
         Left            =   120
         TabIndex        =   3
         Top             =   240
         Width           =   735
      End
   End
   Begin VB.CommandButton ButtonEnd 
      Caption         =   "结束"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   7680
      TabIndex        =   1
      Top             =   6480
      Width           =   1095
   End
   Begin VB.CommandButton ButtonStart 
      Caption         =   "开始命令"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   4080
      TabIndex        =   0
      Top             =   6480
      Width           =   1095
   End
   Begin MSForms.ScrollBar ScrollBar1 
      Height          =   1215
      Left            =   5280
      TabIndex        =   62
      Top             =   3120
      Width           =   255
      Size            =   "450;2143"
   End
   Begin VB.Label LabelDisplay 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1800
      TabIndex        =   54
      Top             =   5280
      Width           =   3615
   End
   Begin VB.Label LabelType 
      Alignment       =   2  'Center
      Caption         =   "文字"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1200
      TabIndex        =   50
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "返回码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   47
      Top             =   5400
      Width           =   735
   End
   Begin VB.Label LabelMode 
      Caption         =   "出字方式"
      Height          =   255
      Left            =   2040
      TabIndex        =   40
      Top             =   3720
      Width           =   735
   End
   Begin VB.Label LabelVelocity 
      Caption         =   "出字速度"
      Height          =   255
      Left            =   120
      TabIndex        =   22
      Top             =   3720
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bStartcomm As Boolean
Dim myZmjFontType As ZmjFontType
Dim myZmjFontStyle As ZmjFontStyle
Dim myZmjWindow As ZmjWindow
Dim nCommType As Integer '命令类型
Dim strText As String '文字内容
Dim nDateType As Integer '日期类型
Dim nDelayNum As Integer '停留时间

Dim nRetCode As Long '返回值

Dim bMultiDuan As Boolean  '是否多段模式
Dim nCurrentDuan As Integer '当前段号

Dim bDuanNo As Boolean  '是开始命令还是开始播放段表


Const ZMJ_TEXT = 1
Const ZMJ_CLEAR = 2
Const ZMJ_DATE = 3
Const ZMJ_TIME = 4
Const ZMJ_PAUSE = 5
Private Sub InitData()
    nDateType = ComboDateType.ListIndex
    strText = TextText.Text
    bMultiDuan = CheckDuan.Value
    nCurrentDuan = TextDuanNo.Text
    
    If (bMultiDuan) Then
        TextDuanNo.Visible = True
        UpDownDuanNo.Visible = True
        LabelDuanNo.Visible = True
    Else
        TextDuanNo.Visible = False
        UpDownDuanNo.Visible = False
        LabelDuanNo.Visible = False
    End If
    
    myZmjFontStyle.byBiLines = CheckDoubleLines.Value
    myZmjFontStyle.byReverse = CheckReverse.Value
    myZmjFontStyle.byWidthScale = UpDownZoom.Value
    
    myZmjFontType.byFormat = ComboFormat.ListIndex + 1
    myZmjFontType.byMode = ComboMode.ListIndex + 1
    myZmjFontType.byFontSpace = UpDownSpace.Value
    myZmjFontType.byRate = UpDownVelocity.Value
    
    If (OptionFontType1.Value = True) Then
        myZmjFontType.byFontType = 1
    ElseIf (OptionFontType2.Value = True) Then
        myZmjFontType.byFontType = 2
    ElseIf (OptionFontType3.Value = True) Then
        myZmjFontType.byFontType = 3
    End If

    If (OptionFore1.Value = True) Then
        myZmjFontType.byColor = 0
    ElseIf (OptionFore1.Value = True) Then
        myZmjFontType.byColor = 1
    ElseIf (OptionFore1.Value = True) Then
        myZmjFontType.byColor = 2
    ElseIf (OptionFore1.Value = True) Then
        myZmjFontType.byColor = 3
    End If
    
    nPosition = CInt(TextX0.Text)
    myZmjWindow.wLeft = nPosition
    nPosition = CInt(TextX1.Text)
    myZmjWindow.wRight = nPosition
    nPosition = CInt(TextY0.Text)
    myZmjWindow.wTop = nPosition
    nPosition = CInt(TextY1.Text)
    myZmjWindow.wBottom = nPosition

⌨️ 快捷键说明

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