VERSION 5.00
Begin VB.Form Frmdjsh 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "倒计时钟"
   ClientHeight    =   2895
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6405
   ForeColor       =   &H0000FFFF&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2895
   ScaleWidth      =   6405
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3960
      Top             =   2040
   End
   Begin VB.Image Img1 
      Height          =   2055
      Left            =   120
      Stretch         =   -1  'True
      Top             =   720
      Width           =   2295
   End
   Begin VB.Label Lbl3 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   2280
      TabIndex        =   2
      Top             =   2160
      Width           =   3975
   End
   Begin VB.Label Lbl2 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   42
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   855
      Left            =   3000
      TabIndex        =   1
      Top             =   960
      Width           =   2895
   End
   Begin VB.Label Lbl1 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "华文中宋"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   615
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   6375
   End
End
Attribute VB_Name = "Frmdjsh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim dd As Single
Private Sub Form_Activate()
  Lbl2.Caption = dd & "天"
End Sub
Private Sub Form_Load()
  Lbl1.Caption = "离2008年北京奥运会开幕还有"
  y = Format(Date, "yyyy")
  m = Format(Date, "mm")
  d = Format(Date, "dd")
  dd = DateSerial(2008, 8, 8) - DateSerial(y, m, d)
End Sub

Private Sub Timer1_Timer()
  Static n%                               '定义变量n为静态整型变量
  a = Fix(86400 - Timer())
  hh = Format(a \ 3600, "00")
  mm = Format(a \ 60 - hh * 60, "00")
  ss = Format(a Mod 60, "00")
  Lbl3.Caption = CStr(hh) + " 小时 " + CStr(mm) + " 分 " + CStr(ss) + " 秒"
  If a = 0 Then
    dd = dd - 1
    Lbl2.Caption = dd
  End If
  n = n + 1
  Img1.Picture = LoadPicture(CStr(n) + ".jpg")
  If n = 5 Then          '有5张福娃图片
    n = 0
  End If
End Sub
