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

📄 frmringtime.frm

📁 依时利 EastRiver IC卡考勤机写卡程 VB
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmRingtime 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "打铃时间"
   ClientHeight    =   1800
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1800
   ScaleWidth      =   4680
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton cmdClose 
      Caption         =   "取消"
      Height          =   375
      Left            =   3120
      TabIndex        =   3
      Top             =   1200
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定"
      Height          =   375
      Left            =   1680
      TabIndex        =   2
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox txtTimeLen 
      Height          =   330
      Left            =   2640
      TabIndex        =   1
      Text            =   "30"
      Top             =   600
      Width           =   1005
   End
   Begin MSComCtl2.DTPicker dpRingtime 
      Height          =   375
      Left            =   480
      TabIndex        =   0
      Top             =   600
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      _Version        =   393216
      Format          =   62455810
      CurrentDate     =   37964
   End
   Begin VB.Label Label3 
      Caption         =   "秒"
      Height          =   255
      Left            =   3705
      TabIndex        =   6
      Top             =   660
      Width           =   495
   End
   Begin VB.Label Label2 
      Caption         =   "持续时间"
      Height          =   255
      Left            =   2640
      TabIndex        =   5
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "打铃时间"
      Height          =   255
      Left            =   480
      TabIndex        =   4
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "frmRingtime"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public hPort As Long

Private Sub cmdClose_Click()
    Unload frmRingtime
End Sub

Private Sub cmdOk_Click()
    Dim S As String
    Dim i, k As Integer
    Dim hour, min, sec, timelen As String
    Dim ltmX As ListItem
    
    
    If hPort > 0 Then
        k = 0
        S = dpRingtime.Value
        For i = 1 To Len(S)
            If Mid(S, i, 1) = ":" Then
                k = k + 1
            End If
            If k = 1 Then
                Exit For
            End If
        Next i
        If k = 1 Then
            hour = Format(Trim(Mid(S, i - 2, 2)), "00")
            min = Mid(S, i + 1, 2)
            sec = Mid(S, i + 4, 2)
        End If
        If txtTimeLen.Text = "" Then
            timelen = 0
        Else
            timelen = txtTimeLen.Text
        End If
        If hour <> "" And min <> "" And sec <> "" And timelen <> "" Then
            If EastRiver.SetRing(hPort, CLng(hour), CLng(min), CLng(sec), CLng(timelen)) Then
                frmMain.msg.Caption = "成功"
                Set ltmX = frmMain.lvRingTime.ListItems.Add
                    ltmX.Text = hour
                    ltmX.SubItems(1) = min
                    ltmX.SubItems(2) = sec
                    ltmX.SubItems(3) = timelen
                frmMain.lvRingTime.Sorted = True
            End If
        End If
    End If
    Unload frmRingtime
End Sub

⌨️ 快捷键说明

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