VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2130
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2130
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   300
      Left            =   3495
      TabIndex        =   6
      Top             =   1695
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改系统日期"
      Height          =   330
      Left            =   270
      TabIndex        =   5
      Top             =   1665
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "修改系统时间"
      Height          =   300
      Left            =   1845
      TabIndex        =   4
      Top             =   1695
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   1305
      TabIndex        =   2
      Text            =   "Text2"
      Top             =   840
      Width           =   1575
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3300
      Top             =   495
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1305
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   270
      Width           =   1605
   End
   Begin VB.Label Label2 
      Caption         =   "系统时间："
      Height          =   255
      Left            =   285
      TabIndex        =   3
      Top             =   825
      Width           =   900
   End
   Begin VB.Label Label1 
      Caption         =   "系统日期："
      Height          =   255
      Left            =   270
      TabIndex        =   1
      Top             =   330
      Width           =   900
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
    Dim strTmp As String
    strTmp = InputBox("请输入新的系统日期:(yyyy-mm-dd)", "修改系统日期") '获取新日期字符串
    If strTmp <> "" Then
        Date = CDate(strTmp)                    '改变系统日期
        MsgBox "新的系统日期为" + Str(Date)     '显示改变后的日期
    End If
End Sub

Private Sub Command2_Click()
    Dim strTmp As String
    strTmp = InputBox("请输入新的系统日期:(hh-mm-ss)", "修改系统时间") '获取新时间字符串
    If strTmp <> "" Then
        Time = CDate(strTmp)                    '改变系统时间
        MsgBox "新的系统时间为" + Str(Time)     '显示改变后的时间
    End If
End Sub

Private Sub Command3_Click()
    End
End Sub

Private Sub Form_Load()
    Timer1.Interval = 1000

    
End Sub

Private Sub Timer1_Timer()
    Text1.Text = Date
    Text2.Text = Time
End Sub
