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

📄 form3.frm

📁 随着计算机的不断发展和普及
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form3 
   Caption         =   "响铃设置"
   ClientHeight    =   6630
   ClientLeft      =   3450
   ClientTop       =   1470
   ClientWidth     =   6060
   LinkTopic       =   "Form3"
   LockControls    =   -1  'True
   Picture         =   "form3.frx":0000
   ScaleHeight     =   6630
   ScaleWidth      =   6060
   Begin VB.CommandButton Command2 
      Caption         =   "加入任务"
      Height          =   375
      Left            =   840
      TabIndex        =   17
      Top             =   6120
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   375
      Left            =   3840
      TabIndex        =   16
      Top             =   6120
      Width           =   1215
   End
   Begin VB.Frame Frame5 
      BackColor       =   &H00E2BD8F&
      Caption         =   "暂时任务"
      Height          =   1215
      Left            =   480
      TabIndex        =   13
      Top             =   1320
      Width           =   5175
      Begin VB.TextBox Text2 
         BackColor       =   &H00EDE4D1&
         Height          =   735
         Left            =   240
         MultiLine       =   -1  'True
         TabIndex        =   15
         Top             =   240
         Width           =   4695
      End
   End
   Begin VB.Frame Frame4 
      BackColor       =   &H00E2BD8F&
      Caption         =   "永久任务"
      Height          =   1215
      Left            =   480
      TabIndex        =   12
      Top             =   0
      Width           =   5175
      Begin VB.TextBox Text1 
         BackColor       =   &H00EDE4D1&
         Height          =   855
         Left            =   240
         MultiLine       =   -1  'True
         TabIndex        =   14
         Top             =   240
         Width           =   4695
      End
   End
   Begin VB.Frame Frame3 
      BackColor       =   &H00E2BD8F&
      Caption         =   "选择类型"
      Height          =   615
      Left            =   3360
      TabIndex        =   9
      Top             =   2640
      Width           =   2055
      Begin VB.OptionButton Option4 
         BackColor       =   &H00E2BD8F&
         Caption         =   "今次"
         Height          =   255
         Left            =   1200
         TabIndex        =   11
         Top             =   240
         Width           =   735
      End
      Begin VB.OptionButton Option3 
         BackColor       =   &H00E2BD8F&
         Caption         =   "每日"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   240
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00E2BD8F&
      Caption         =   "选择任务"
      Height          =   615
      Left            =   600
      TabIndex        =   6
      Top             =   2640
      Width           =   2055
      Begin VB.OptionButton Option2 
         BackColor       =   &H00E2BD8F&
         Caption         =   "定时提醒"
         Height          =   255
         Left            =   960
         TabIndex        =   8
         Top             =   240
         Width           =   1095
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00E2BD8F&
         Caption         =   "响铃"
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   240
         Width           =   735
      End
   End
   Begin VB.TextBox Datetxt 
      BackColor       =   &H00EDE4D1&
      Height          =   375
      Left            =   3360
      TabIndex        =   3
      Top             =   3960
      Width           =   2175
   End
   Begin VB.TextBox Timetxt 
      BackColor       =   &H00EDE4D1&
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   3960
      Width           =   2175
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00E2BD8F&
      Caption         =   "提醒内容"
      Height          =   1215
      Left            =   480
      TabIndex        =   0
      Top             =   4560
      Width           =   5175
      Begin VB.TextBox Alerttxt 
         BackColor       =   &H00EDE4D1&
         Height          =   855
         Left            =   240
         MultiLine       =   -1  'True
         TabIndex        =   1
         Top             =   240
         Width           =   4695
      End
   End
   Begin VB.Label Label2 
      BackColor       =   &H00E2BD8F&
      Caption         =   "输入日期(yy-mm-dd)"
      Height          =   255
      Left            =   3360
      TabIndex        =   5
      Top             =   3600
      Width           =   2055
   End
   Begin VB.Label Label1 
      BackColor       =   &H00E2BD8F&
      Caption         =   "输入时间:(hh:mm)"
      Height          =   255
      Left            =   600
      TabIndex        =   4
      Top             =   3600
      Width           =   2055
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim forever As String, d As Integer
Private Sub Alerttxt_Click()
   Dim ls As Integer
   ls = Len(Alerttxt)
   Alerttxt.SelStart = 0
   Alerttxt.SelLength = ls
End Sub
Private Sub Command1_Click()
    Unload Me
End Sub
Private Sub Command2_Click()
 If Timetxt <> "" Then
    Dim worktxt As String
    If Option1.Value = True Then
       worktxt = "闹铃"
    Else
       worktxt = "提醒"
    End If
    If Option3.Value = True Then
       worktxt = worktxt + "每日"
    Else
       worktxt = worktxt + "今次"
    End If
    If Option2.Value = True Then
      If Option4.Value = True Then
       worktxt = worktxt + Timetxt + "#" + Datetxt + Alerttxt
       b = True
      Else
       worktxt = worktxt + Timetxt + Alerttxt
      End If
    Else
      worktxt = worktxt + Timetxt
    End If
    If Text1.Enabled = True Then
     If Text1.Text <> "" Then
       Text1.Text = Text1.Text + vbCrLf + worktxt
     Else
       Text1.Text = worktxt
     End If
     Open App.Path + "\forever.dat" For Output As 1
     Print #1, Text1.Text
     Close #1
     forever = Text1.Text
    ElseIf Text2.Enabled = True Then
      If Text2 <> "" Then
       Text2.Text = Text2.Text + vbCrLf + worktxt
      Else
       Text2.Text = worktxt
      End If
    End If
  End If
End Sub
Private Sub Form_Load()
    Dim inputdata As String
    Open App.Path + "\forever.dat" For Input As 1
    On Error Resume Next
    Line Input #1, inputdata
    forever = inputdata
    Do While Not EOF(1)
      Line Input #1, inputdata
      forever = forever + vbCrLf + inputdata
    Loop
    Close #1
    Dim sl As Integer
    If clockn(0) <> "" Then
       Text2.Text = "闹铃今次" + clockn(0)
    End If
    For sl = 1 To 50
       If clockn(sl) <> "" Then
          Text2.Text = Text2.Text + vbCrLf + "闹铃今次" + clockn(sl)
       End If
    Next sl
    Text1.Text = forever
    Option4.Value = True
    Option2.Value = True
    Text1.Enabled = True
    Text2.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
    If Text1 <> forever Then
     Open App.Path + "\forever.dat" For Output As 1
     Print #1, Text1.Text
     Close #1
    End If
    Dim start As Integer, last As Integer
    If Text2.Text <> "" Then
       Text2.Text = Text2.Text + vbCrLf
       last = InStr(1, Text2, Chr(13))
       start = 1
       Do While last <> 0
         If Mid$(Text2, start, last - start) <> "" Then
           clockn(d) = Mid$(Mid$(Text2, start, last - start), 5, 5)
           d = d + 1
         End If
          start = last + 2
          last = InStr(start, Text2, Chr(13))
         Loop
    End If
    htoday = False
    Dim a As Integer, b As Integer, c As Integer
    Dim inputdata As String
    Open App.Path + "\forever.dat" For Input As 1
    On Error Resume Next
    Do While Not EOF(1)
      Line Input #1, inputdata
      Select Case typetime(inputdata)
          Case 1
             Clockf(a) = Mid$(inputdata, 5)
             a = a + 1
          Case 3
             Alertft(b) = Mid$(inputdata, 5, 5)
             alertfms(b) = Mid$(inputdata, 10)
             b = b + 1
          Case 4
             If Mid$(inputdata, 11, 8) = Format(Now, "yy-mm-dd") Then
              htoday = True
              Alertot(c) = Mid$(inputdata, 5, 5)
              alertoda(c) = Mid$(inputdata, 11, 8)
              alertoms(c) = Mid$(inputdata, 19)
              c = c + 1
             End If
      End Select
    Loop
    alc = c - 1
    Close #1
End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub Frame3_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub Label2_Click()

End Sub

Private Sub Option1_Click()
    Datetxt.Enabled = False
    Alerttxt.Enabled = False
    If Option4.Value = True Then
       Text1.Enabled = False
       Text2.Enabled = True
    End If
End Sub
Private Sub Option2_Click()
  If Option4.Value = True Then
    Datetxt.Enabled = True
    Text1.Enabled = True
    Text2.Enabled = False
  Else
    Datetxt.Enabled = False
  End If
  Alerttxt.Enabled = True
End Sub
Private Sub Option3_Click()
    Text1.Enabled = True
    Text2.Enabled = False
    If Option2.Value = True Then
       Datetxt.Enabled = False
    End If
End Sub
Private Sub Option4_Click()
  If Option2.Value = True Then
    Text1.Enabled = True
    Text2.Enabled = False
  Else
    Text1.Enabled = False
    Text2.Enabled = True
  End If
    If Option2.Value = True Then
       Datetxt.Enabled = True
    End If
End Sub
Private Sub Timetxt_Click()
   Timetxt.SelStart = 0
   Timetxt.SelLength = 5
End Sub

⌨️ 快捷键说明

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