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

📄 form1.frm

📁 一个电视节目查询软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "电视节目向导"
   ClientHeight    =   6480
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8520
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   MouseIcon       =   "Form1.frx":628A
   ScaleHeight     =   6480
   ScaleWidth      =   8520
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Tag             =   "hh:mm:ss"
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   8280
      Top             =   600
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   8280
      Top             =   120
   End
   Begin VB.PictureBox Picture6 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   600
      Left            =   3240
      MouseIcon       =   "Form1.frx":EDFC
      Picture         =   "Form1.frx":1796E
      ScaleHeight     =   600
      ScaleWidth      =   600
      TabIndex        =   20
      ToolTipText     =   "退出程序"
      Top             =   0
      Width           =   600
   End
   Begin VB.PictureBox Picture5 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   585
      Left            =   5640
      Picture         =   "Form1.frx":19822
      ScaleHeight     =   585
      ScaleWidth      =   600
      TabIndex        =   18
      Top             =   0
      Width           =   600
   End
   Begin VB.PictureBox Picture4 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   600
      Left            =   2520
      Picture         =   "Form1.frx":1BC96
      ScaleHeight     =   600
      ScaleWidth      =   600
      TabIndex        =   17
      ToolTipText     =   "关于"
      Top             =   0
      Width           =   600
   End
   Begin VB.PictureBox Picture3 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   600
      Left            =   1800
      Picture         =   "Form1.frx":1DA01
      ScaleHeight     =   600
      ScaleWidth      =   600
      TabIndex        =   16
      ToolTipText     =   "设置"
      Top             =   0
      Width           =   600
   End
   Begin VB.PictureBox Picture2 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   600
      Left            =   1080
      Picture         =   "Form1.frx":1F794
      ScaleHeight     =   600
      ScaleWidth      =   600
      TabIndex        =   15
      ToolTipText     =   "保存节目单"
      Top             =   0
      Width           =   600
   End
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   510
      Left            =   360
      Picture         =   "Form1.frx":2152C
      ScaleHeight     =   510
      ScaleWidth      =   510
      TabIndex        =   14
      ToolTipText     =   "打开文件"
      Top             =   0
      Width           =   510
   End
   Begin VB.OptionButton Option7 
      Caption         =   "星期日"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   7440
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option6 
      Caption         =   "星期六"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   6720
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option5 
      Caption         =   "星期五"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   6000
      Style           =   1  'Graphical
      TabIndex        =   11
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option4 
      Caption         =   "星期四"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   5280
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option3 
      Caption         =   "星期三"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   4560
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option2 
      Caption         =   "星期二"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   3840
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   600
      Width           =   735
   End
   Begin VB.OptionButton Option1 
      Caption         =   "星期一"
      ForeColor       =   &H00FF8080&
      Height          =   495
      Left            =   3120
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   600
      Width           =   735
   End
   Begin VB.Frame Frame2 
      Height          =   615
      Left            =   3120
      TabIndex        =   5
      Top             =   1080
      Width           =   5175
      Begin VB.Label Label3 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF8080&
         Height          =   255
         Left            =   3720
         TabIndex        =   21
         Top             =   240
         Width           =   1215
      End
      Begin VB.Label Label1 
         BeginProperty Font 
            Name            =   "方正稚艺简体"
            Size            =   18
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF80FF&
         Height          =   375
         Left            =   1320
         TabIndex        =   6
         Top             =   120
         Width           =   2295
      End
   End
   Begin VB.TextBox Text2 
      Height          =   4455
      Left            =   3120
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   4
      Top             =   1800
      Width           =   5175
   End
   Begin VB.ListBox List1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4470
      Left            =   120
      TabIndex        =   3
      Top             =   1800
      Width           =   2775
   End
   Begin VB.Frame Frame1 
      Caption         =   "电视台搜索"
      BeginProperty Font 
         Name            =   "方正稚艺简体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   120
      TabIndex        =   0
      Top             =   600
      Width           =   2775
      Begin VB.CommandButton Command1 
         Height          =   375
         Left            =   2040
         Picture         =   "Form1.frx":23AAF
         Style           =   1  'Graphical
         TabIndex        =   2
         ToolTipText     =   "搜索"
         Top             =   480
         Width           =   495
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   1695
      End
   End
   Begin VB.Label Label2 
      BeginProperty Font 
         Name            =   "方正稚艺简体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H008080FF&
      Height          =   375
      Left            =   6360
      TabIndex        =   19
      Top             =   120
      Width           =   1815
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String)
Private Declare Function WritePrivateProfileString& Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As String, ByVal lpFileName As String)

Dim fso As New FileSystemObject         '文件系统对象声明
Dim fil As File
Dim txt As String

Dim n As Long               'INI配置文件使用
Dim strtv As String

Private Sub Command1_Click()

    Dim i As Integer
    i = 0
    
If Trim(Text1.Text) <> "" Then
    Do While i < List1.ListCount
        If Trim(UCase(Text1.Text)) <> Trim(List1.List(i)) Then
            i = i + 1
        Else
            Exit Do
        End If
    Loop
    
    If i < List1.ListCount Then
        MsgBox "电视台搜索成功!", vbOKOnly + vbExclamation, "提示"
        List1.Selected(i) = True
        List1_Click
    Else
        MsgBox "搜索失败!", vbOKOnly + vbExclamation, "提示"
        Text1.SetFocus
    End If
Else
    MsgBox "请先输入要搜索的电视台!", vbOKOnly + vbExclamation, "提示"
    Text1.SetFocus
    Exit Sub
End If
    
End Sub

Private Sub Form_Load()

    Dim f As TextStream
    Dim i As Integer
    i = 0
    Dim sum As Integer
    Dim tmp As String
    tmp = String(255, 0)
    
    On Error GoTo ErrorHandler
    
    n = GetPrivateProfileString&("TVsum", "sum", "", tmp, Len(tmp), App.Path & "\nettv.ini")
    sum = CInt(tmp)
    
    Open App.Path & "\show.wol" For Input As #1
    
    Do While i < sum
        Line Input #1, tmp
        List1.AddItem (tmp)
        i = i + 1
    Loop
    
    Close #1
    
    Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\01.txt")
    Text2.Text = f.ReadAll
    Label1.Caption = "CCTV1"
    Label3.Caption = "全周"
    List1.Selected(0) = True
    Exit Sub
    
ErrorHandler:
    MsgBox "节目单加载出错,请重新运行!", vbOKOnly + vbExclamation, "提示"
    
End Sub

Private Sub List1_Click()

    Dim f As TextStream
    Dim tmp As String
    tmp = Trim(List1.List(List1.ListIndex))
    Label1.Caption = tmp
    Label3.Caption = "全周"
    
    Select Case List1.ListIndex
        Case 0
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\01.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 1
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\02.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 2
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\03.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 3
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\04.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 4
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\05.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 5
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\06.txt")
                Text2.Text = f.ReadAll
                txt = Text2.Text
        Case 6
                Set f = fso.OpenTextFile(App.Path & "\showtime\节目单\07.txt")

⌨️ 快捷键说明

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