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

📄 frmsetjiaban.frm

📁 VB写的通过串口与考勤机连接通讯的程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSetJiaBan 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "加班设定"
   ClientHeight    =   2355
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5775
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   14.25
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2355
   ScaleWidth      =   5775
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取  消"
      Height          =   375
      Left            =   3480
      TabIndex        =   8
      Top             =   1800
      Width           =   1095
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确  定"
      Height          =   375
      Left            =   1080
      TabIndex        =   3
      Top             =   1800
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   1575
      Left            =   240
      TabIndex        =   0
      Top             =   0
      Width           =   5295
      Begin VB.TextBox txtHour 
         Height          =   405
         Left            =   960
         TabIndex        =   2
         Top             =   780
         Width           =   735
      End
      Begin VB.TextBox txtMin 
         Height          =   405
         Left            =   2665
         TabIndex        =   1
         Top             =   780
         Width           =   735
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "视为加班"
         Height          =   285
         Left            =   3840
         TabIndex        =   7
         Top             =   1200
         Width           =   1140
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "分"
         Height          =   285
         Left            =   3600
         TabIndex        =   6
         Top             =   840
         Width           =   285
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "小时"
         Height          =   285
         Left            =   1890
         TabIndex        =   5
         Top             =   840
         Width           =   570
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "超出正常工作时间"
         Height          =   285
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Width           =   2280
      End
   End
End
Attribute VB_Name = "frmSetJiaBan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOk_Click()
Set adoRs = adoCon.Execute("select * from JiaBan")
If txtHour = "" Or txtHour > 24 Or txtHour < 0 Or txtMin = "" Or txtMin > 60 Or txtMin < 0 Then
   MsgBox "您的时间设定有误,请核实!", vbOKOnly + vbExclamation, "系统提示 "
   Exit Sub
End If
If adoRs.EOF Then
   adoCon.Execute ("insert into JiaBan values('" & Trim(txtHour.Text) & "','" & Trim(txtMin.Text) & "')")
Else
   adoCon.Execute ("update JiaBan set Hour='" & Trim(txtHour.Text) & "',Min='" & Trim(txtMin.Text) & "'")
End If
End Sub

Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 - 1900
txtHour = 1
txtMin = 0
End Sub

⌨️ 快捷键说明

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