你的时间,就是“hh:mm:ss”的表示格式正确吗?

解决方案 »

  1.   

    你想让程序在某个时刻执行某条语句的代码是不是放在TIMER控件的代码中?
      

  2.   

    每台电脑的时间格式设置不一样,now的值不一样,所以先得转换一下,再比较
      

  3.   

    VERSION 5.00
    Begin VB.Form Form1 
       Caption         =   "Form1"
       ClientHeight    =   3195
       ClientLeft      =   60
       ClientTop       =   345
       ClientWidth     =   4680
       LinkTopic       =   "Form1"
       ScaleHeight     =   3195
       ScaleWidth      =   4680
       StartUpPosition =   3  'Windows Default
       Begin VB.Timer Timer1 
          Interval        =   1
          Left            =   2100
          Top             =   855
       End
       Begin VB.CommandButton Command1 
          Caption         =   "Command1"
          Height          =   495
          Left            =   1740
          TabIndex        =   0
          Top             =   1350
          Width           =   1215
       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()
        If Date = "2001-6-17" Then End
    End Sub
    Private Sub Timer1_Timer()
        If Time = "22:40:12" Then End
    End Sub
      

  4.   

    请把以上的保存为 asdf.frm 
      

  5.   

    to showyeah:
    核心
    xxlroad:
    Good!