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

📄 formtime.frm

📁 一个可以自动播放的软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FormTime 
   Caption         =   "设置时间"
   ClientHeight    =   1860
   ClientLeft      =   3225
   ClientTop       =   3765
   ClientWidth     =   4485
   LinkTopic       =   "Form2"
   ScaleHeight     =   1860
   ScaleWidth      =   4485
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text次数 
      Height          =   270
      Left            =   840
      TabIndex        =   8
      Text            =   "1"
      Top             =   1530
      Width           =   495
   End
   Begin VB.CommandButton Cmd确定 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   3000
      TabIndex        =   6
      Top             =   960
      Width           =   1215
   End
   Begin VB.TextBox Txt任务 
      Height          =   270
      Left            =   120
      TabIndex        =   4
      Text            =   "Text2"
      Top             =   360
      Width           =   4095
   End
   Begin VB.ComboBox Combo计划 
      Height          =   300
      Left            =   120
      TabIndex        =   1
      Text            =   "每天"
      Top             =   1080
      Width           =   1215
   End
   Begin VB.TextBox TextTime 
      Height          =   270
      Left            =   1560
      TabIndex        =   3
      Text            =   "6:00"
      Top             =   1080
      Width           =   1215
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "循环播放      次"
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   1560
      Width           =   1575
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "播放任务:"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "开始时间(&T):"
      Height          =   255
      Left            =   1560
      TabIndex        =   2
      Top             =   840
      Width           =   1335
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "计划任务(&S):"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   1215
   End
End
Attribute VB_Name = "FormTime"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Cmd确定_Click()

    If TaskOption Then
        ''属性
        If Combo计划.ListIndex = -1 Then Combo计划.ListIndex = 0
        OP_task.TaskPlan = Combo计划.ListIndex
        OP_task.TaskTime = TextTime.Text & ":00"
        OP_task.TaskReplay = Text次数.Text
        TaskArr(OP_Num) = OP_task.TaskName & " (" & OP_task.TaskPlan & "#" & OP_task.TaskTime & "@" & OP_task.TaskReplay
        Task_Str = Combo计划.Text & OP_task.TaskTime & " 循环播放" & OP_task.TaskReplay & "次"
        
    Else
    ''添加
        If Combo计划.ListIndex = -1 Then Combo计划.ListIndex = 0
        Add_SongTask.TaskPlan = Combo计划.ListIndex
        Add_SongTask.TaskTime = TextTime.Text & ":00"
        Add_SongTask.TaskReplay = Text次数.Text
        TaskArr(TaskNumber) = Add_SongTask.TaskName & " (" & Add_SongTask.TaskPlan & "#" & Add_SongTask.TaskTime & "@" & Add_SongTask.TaskReplay
        Task_Str = Combo计划.Text & Add_SongTask.TaskTime & " 循环播放" & Add_SongTask.TaskReplay & "次"
    
    End If
    
    TaskOption = False
    
    'CloseTime = CDate(TextAutoClosetime.Text)
    
    Unload Me
End Sub

Private Sub Form_Load()
    With Combo计划
        .AddItem "每天", 0
        .AddItem "每工作日", 1
        .AddItem "每周日", 2
    End With
    
If TaskOption Then
'On Error Resume Next

    Dim OP_Str As String
    OP_Str = TaskArr(OP_Num)
    Dim nn1 As Integer, nn2 As Integer, nn3 As Integer
    nn1 = InStr(OP_Str, "(")
    nn2 = InStr(OP_Str, "#")
    nn3 = InStr(OP_Str, "@")
    OP_task.TaskName = Mid(OP_Str, 1, nn1 - 1)
    OP_task.TaskPlan = Mid(OP_Str, nn1 + 1, nn2 - nn1 - 1)
    OP_task.TaskTime = Mid(OP_Str, nn2 + 1, nn3 - nn2 - 1)
    OP_task.TaskReplay = Mid(OP_Str, nn3 + 1)
    Txt任务.Text = OP_task.TaskName
    Combo计划.ListIndex = OP_task.TaskPlan
    TextTime.Text = Mid(OP_task.TaskTime, 1, Len(OP_task.TaskTime) - 3)
    Text次数.Text = OP_task.TaskReplay
    
Else

    Txt任务.Text = Add_SongName
    TextTime.Text = Hour(Time) & ":" & Minute(Time)
End If

End Sub

⌨️ 快捷键说明

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