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

📄 set_dt.frm

📁 This is a boiler test system,has been use in factory
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   15
         Text            =   "1"
         Top             =   1065
         Width           =   645
      End
      Begin VB.TextBox Textri 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "System"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   8
         Text            =   "1"
         Top             =   1680
         Width           =   645
      End
      Begin VB.TextBox Textnian 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "System"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   4
         Text            =   "1999"
         Top             =   450
         Width           =   645
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "日:"
         Height          =   180
         Left            =   300
         TabIndex        =   7
         Top             =   1800
         Width           =   270
      End
      Begin VB.Label Label2 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "月:"
         Height          =   180
         Left            =   300
         TabIndex        =   6
         Top             =   1140
         Width           =   270
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "年:"
         Height          =   180
         Left            =   300
         TabIndex        =   5
         Top             =   540
         Width           =   270
      End
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BackColor       =   &H80000004&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Label4"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   1530
      TabIndex        =   22
      Top             =   2542
      Width           =   1065
   End
End
Attribute VB_Name = "set_dt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim nian, yue As Integer
Private Sub Comboyue_Click()
 yue = Val(Comboyue.Text)
End Sub

Private Sub Command1_Click()
 ddd$ = Textnian.Text + "-" + Format$(Val(Comboyue.Text), "00") + "-" + Format$(Val(Textri.Text), "00")
 Date$ = ddd$
 ttt$ = Format$(Val(Texts.Text), "00") + ":" + Format$(Val(Textf.Text), "00") + ":" + Format$(Val(Textm.Text), "00")
 Time$ = ttt$
 Timer1.Enabled = False
Unload Me
End Sub

Private Sub Command2_Click()
 Timer1.Enabled = False
' Me.Hide
Unload Me
End Sub

Private Sub Form_Activate()
  Texts.Text = Mid$(Time$, 1, 2) '小时
  Textf.Text = Mid$(Time$, 4, 2) '分
  Textm.Text = Mid$(Time$, 7, 2) '秒
End Sub

Private Sub Form_Deactivate()
 Timer1.Enabled = False
 Unload Me
End Sub

Private Sub Form_Load()
 Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
'---------------------------
  Textnian.Text = Mid$(Date$, 1, 4) '年
   nian = Val(Textnian.Text)
  Comboyue.Text = Mid$(Date$, 6, 2) '月
   yue = Val(Comboyue.Text)
  Textri.Text = Mid$(Date$, 9, 2) '日
'-------------------------------

aa% = Weekday(Date$)
Label4.Caption = Week1(aa%)

End Sub

Private Sub Timer1_Timer()
  mm% = Val(Textm.Text) + 1
  If mm% >= 60 Then
     mm% = 0
     ff% = Val(Textf.Text) + 1
     If ff% >= 60 Then
        ff% = 0
        ss% = Val(Texts.Text) + 1
        If ss% >= 24 Then ss% = 0
        Texts.Text = Format$(ss%, "00")
     End If
     Textf.Text = Format$(ff%, "00")
  End If
  Textm.Text = Format$(mm%, "00")

End Sub


Private Sub UpDown1_DownClick(Index As Integer)
  nian1$ = Trim$(Textnian.Text)
  yue1$ = Trim$(Comboyue.Text)
  ri1$ = Trim$(Textri.Text)
  '1999.05.03 于沈阳鹭岛
Select Case Index
Case 0
  Date12$ = DateAdd("yyyy", -1, DateSerial(nian1$, yue1$, ri1$)) '以 年("yyyy")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
Case 1
  Date12$ = DateAdd("m", -1, DateSerial(nian1$, yue1$, ri1$)) '以年("yyyy")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
Case 2
  Date12$ = DateAdd("d", -1, DateSerial(nian1$, yue1$, ri1$)) '以日("d")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
End Select
  Textnian = Mid$(Date12$, 1, 4)
  Comboyue = Mid$(Date12$, 6, 2)
  Textri = Mid$(Date12$, 9, 2)
  aa% = Weekday(Date12$)
  Label4.Caption = Week1(aa%)
End Sub

Private Sub UpDown1_UpClick(Index As Integer)
  nian1$ = Trim$(Textnian.Text)
  yue1$ = Trim$(Comboyue.Text)
  ri1$ = Trim$(Textri.Text)
  
Select Case Index
Case 0
  Date12$ = DateAdd("yyyy", 1, DateSerial(nian1$, yue1$, ri1$)) '以 年("yyyy")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
Case 1
  Date12$ = DateAdd("m", 1, DateSerial(nian1$, yue1$, ri1$)) '以年("yyyy")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
Case 2
  Date12$ = DateAdd("d", 1, DateSerial(nian1$, yue1$, ri1$)) '以日("d")为单位
  Date12$ = Format$(Date12$, "yyyy/mm/dd")                    '计算下一天的日期
End Select
  Textnian = Mid$(Date12$, 1, 4)
  Comboyue = Mid$(Date12$, 6, 2)
  Textri = Mid$(Date12$, 9, 2)
  aa% = Weekday(Date12$)
  Label4.Caption = Week1(aa%)
End Sub
Private Sub UpDownf_DownClick()
   fen% = Val(Textf.Text) - 1
   If fen% <= -1 Then fen% = 59
   Textf.Text = fen%
End Sub

Private Sub UpDownf_UpClick()
   fen% = Val(Textf.Text) + 1
   If fen% >= 60 Then fen% = 0
   Textf.Text = fen%
End Sub

Private Sub UpDownm_DownClick()
   miao% = Val(Textm.Text) - 1
   If miao% <= -1 Then miao% = 59
   Textm.Text = miao%
End Sub

Private Sub UpDownm_UpClick()
   miao% = Val(Textm.Text) + 1
   If miao% >= 60 Then miao% = 0
   Textm.Text = miao%
End Sub
Private Sub UpDowns_DownClick()
   xshi% = Val(Texts.Text) - 1
   If xshi% <= -1 Then xshi% = 23
   Texts.Text = xshi%
End Sub

Private Sub UpDowns_UpClick()
   xshi% = Val(Texts.Text) + 1
   If xshi% >= 24 Then xshi% = 0
   Texts.Text = xshi%
End Sub

⌨️ 快捷键说明

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