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

📄 form1.frm

📁 一个电视节目查询软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 7
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\08.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 8
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\09.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 9
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\10.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 10
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\11.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 11
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\12.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 12
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\13.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 13
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\14.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 14
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\15.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 15
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\安徽台anhui.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 16
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\北京电视台-1btv1.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 17
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\北京电视台-4btv4.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 18
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\东方卫视dongfang.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 19
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\福建东南台fujian.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 20
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\甘肃卫视gansu.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 21
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\广东台guangdong.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 22
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\河北台hebei.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 23
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\河南电视台henan.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 24
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\湖北电视台hubei.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 25
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\湖南卫视hunan.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 26
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\江苏电视台jiangsu.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 27
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\江西电视台jiangxi.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 28
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\教育三台jiaoyu3.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 29
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\教育一台jiaoyu1.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 30
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\辽宁电视台liaoning.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 31
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\内蒙古卫视neimenggu.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 32
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\山东电视台shandong.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 33
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\陕西电视台shanxitai.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 34
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\四川电视台sichuan.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 35
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\天津1tianjin1.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 36
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\天津2tianjin2.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 37
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\天津卫视tianjin.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 38
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\浙江电视台zhejiang.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 39
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\重庆电视台chongqing.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
    End Select
        f.Close
        
        Option1.Value = False
        Option2.Value = False
        Option3.Value = False
        Option4.Value = False
        Option5.Value = False
        Option6.Value = False
        Option7.Value = False
        
End Sub

Private Sub Option1_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期一"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期二") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option2_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期二"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期二") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While (Trim(Right(tmp, 3)) <> "星期三") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option3_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期三"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期三") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While (Trim(Right(tmp, 3)) <> "星期四") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option4_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期四"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期四") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While (Trim(Right(tmp, 3)) <> "星期五") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option5_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期五"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期五") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While (Trim(Right(tmp, 3)) <> "星期六") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option6_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期六"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期六") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While (Trim(Right(tmp, 3)) <> "星期日") And (Not EOF(1))
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Option7_Click()

    Dim tmp As String
    Dim t As String
    t = ""
    Dim f As TextStream
    
    Label3.Caption = "星期日"
    
    Set f = fso.CreateTextFile(App.Path & "\showtime\节目单\temp.txt", True)
    f.Write (txt)
    f.Close
    
    Open App.Path & "\showtime\节目单\temp.txt" For Input As #1
    Line Input #1, tmp
    
    Do While (Trim(Right(tmp, 3)) <> "星期日") And (Not EOF(1))
        Line Input #1, tmp
    Loop
    Do While Not EOF(1)
        t = t & tmp & Chr(13) & Chr(10)
        Line Input #1, tmp
    Loop
    Text2.Text = t
    Close #1
    
End Sub

Private Sub Picture1_Click()

    Dim f As TextStream
    
    CommonDialog1.CancelError = True
    
    On Error GoTo ErrorHandler
    
    CommonDialog1.Filter = "文本文件(*.txt)|*.txt"
    CommonDialog1.FilterIndex = 1
    CommonDialog1.ShowOpen
    
    Set f = fso.OpenTextFile(CommonDialog1.FileName)
    Text2.Text = f.ReadAll
    MsgBox "文件打开成功!", vbOKOnly + vbExclamation, "提示"
    Exit Sub
    
ErrorHandler:
    Exit Sub

End Sub

Private Sub Picture2_Click()

    Dim f As TextStream
    
    CommonDialog1.CancelError = True
    
    On Error GoTo ErrorHandler
    
    CommonDialog1.Filter = "文本文件(*.txt)|*.txt"
    CommonDialog1.FilterIndex = 1
    CommonDialog1.ShowSave
    
    Set f = fso.CreateTextFile(CommonDialog1.FileName, True)
    f.Write (Text2.Text)
    f.Close
    MsgBox "文件保存成功!", vbOKOnly + vbExclamation, "提示"
    Exit Sub
    
ErrorHandler:
    Exit Sub
    
End Sub

Private Sub Picture6_Click()

    MsgBox "谢谢使用本软件!", vbOKOnly + vbExclamation, "提示"
    Unload Me
    
End Sub

Private Sub Text1_GotFocus()

    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
    
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    
    If KeyAscii = 13 Then
        Command1_Click
    End If
    
End Sub

Private Sub Timer1_Timer()

Label2.Caption = Format(Time, Form1.Tag)

End Sub

⌨️ 快捷键说明

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