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

📄 form3.frm

📁 完整的英语900句源码-采用顶条技术
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Width           =   1095
      End
   End
   Begin VB.VScrollBar VScroll4 
      Height          =   1305
      LargeChange     =   10
      Left            =   3420
      Max             =   100
      Min             =   200
      MouseIcon       =   "Form3.frx":0914
      MousePointer    =   99  'Custom
      SmallChange     =   10
      TabIndex        =   31
      Top             =   1485
      Value           =   150
      Width           =   150
   End
   Begin VB.Label Label6 
      Enabled         =   0   'False
      Height          =   60
      Left            =   3615
      TabIndex        =   36
      Top             =   0
      Width           =   60
   End
   Begin VB.Label Label5 
      Height          =   60
      Left            =   0
      TabIndex        =   35
      Top             =   0
      Width           =   60
   End
   Begin VB.Label Label4 
      BackColor       =   &H0000FF00&
      Height          =   60
      Left            =   3600
      TabIndex        =   34
      ToolTipText     =   "恢复默认值"
      Top             =   2100
      Width           =   60
   End
   Begin VB.Label Label1 
      Caption         =   "每句播放      遍"
      Height          =   195
      Left            =   135
      TabIndex        =   13
      Top             =   2760
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "汉语停留      秒"
      Height          =   195
      Left            =   135
      TabIndex        =   18
      Top             =   3480
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "英语停留      秒"
      Height          =   195
      Left            =   135
      TabIndex        =   14
      Top             =   3120
      Width           =   1575
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim txtvoice As New VTxtAuto.VTxtAuto   '引用文本发音引擎
Private ii As Integer  '用来循环刷新范围选择控件的可用行

'修改复选框并立刻修改内存变量
Private Sub Check1_Click()
      ssave = Check1.Value
End Sub

Private Sub Check2_Click()
      red = Check2.Value
End Sub

Private Sub Check3_Click()
      psave = Check3.Value

End Sub

Private Sub Check4_Click()
      visi = Check4.Value
End Sub

Private Sub Check5_Click()
      mark = Check5.Value
End Sub

'载入窗体时用内存变量对各控件进行属性设定及赋值
Private Sub Form_Load()

     '进入设置窗口时对发音引擎进行初始化
     Set txtvoice = Nothing
     txtvoice.Register vbNullString, " "
     
     Form1.Image1.Enabled = False '设置窗口出现时禁止菜单弹出
     Form1.Timer5.Enabled = False '设置时禁止朗读时序
     
     
     '判断是否注册(没注册使功能不完全)
     If sn <= 10 Or sn > 999999 Or sn <> Right(softcode ^ 0.3, 6) Then
            guage = 1 '未注册把范围选择定在1,防止修改注册表破解
            For ii = 0 To 9
              Option1(ii).Enabled = False
              Option1(1).Enabled = True
            Next ii
     Else
            For ii = 0 To 9
              Option1(ii).Enabled = True
            Next ii
     End If
         
         
     If Option2(0).Value = True Then '设定进度复选框的可用性
          Check3.Enabled = False
     Else
          Check3.Enabled = True
     End If
     
     
     '如果软件累计使用时间超过4小时,则使烈焰红唇模式可用
     If usetime >= 9600 Then Check2.Enabled = True
     
     
     Check1.Value = ssave  '为各复选框赋值
     Check2.Value = red
     Check3.Value = psave
     Check4.Value = visi
     Check5.Value = mark
     
     
     Text1(0).Text = n      '为遍数及停留时间(文本框和滚动条)及语速赋值
     Text1(1).Text = etime
     Text1(2).Text = ctime
     VScroll1.Value = n
     VScroll2.Value = etime
     VScroll3.Value = ctime
     VScroll4.Value = sspeed
     
     
     If rd = 0 Then        '为随机顺序方式赋值
          Option2(0).Value = True: Option2(1).Value = False
     Else
          Option2(0).Value = False: Option2(1).Value = True
     End If
     
     If ce = 1 Then        '为英汉次序赋值
          Option3(0).Value = True: Option3(1).Value = False
     Else
          Option3(0).Value = False: Option3(1).Value = True
     End If
          
     '为播放范围赋值
     Option1(guage).Value = True
     
End Sub


'进行软件设置,并在退出时修改内存变量及进行注册表存储
Private Sub Form_Unload(Cancel As Integer)
         
        '首先卸载红唇图片(如果存在)
        If Label6.Enabled = False And Label5.Enabled = False Then Unload Form8
        
        Form1.Image1.Enabled = True '设置窗口退出时恢复菜单弹出
        If oncetime <= 2 Then Form1.Timer5.Enabled = True '完成设置并且欢迎词已经放完,恢复朗读时序
        
       '如果范围设置由其他变为全部则进度值改为最小(11000)
        If Option1(0).Value = True And guage <> 0 And Check3.Value = 1 Then guagen = 11000
       
       '设定播放内容范围和数值到内存变量guzge(n)
        For ii = 0 To 9
        If Option1(ii) Then guage = ii
        Next ii
     
       '设定随机、顺序播放方式到内存变量rd
        If Option2(0).Value = True Then
           rd = 0
           Check3.Enabled = False
        Else
           rd = 1
           Check3.Enabled = True
        End If
     
       '设定英汉次序到内存变量ce
        If Option3(0).Value = True Then
           ce = 1
        Else
           ce = 0
        End If
     
       '将遍数及停留时间及语速的设定值修改到内存变量n\etime\ctime\sspeed
        n = VScroll1.Value
        etime = VScroll2.Value
        ctime = VScroll3.Value
        sspeed = VScroll4.Value
        
        
        '由变量ssave设置判断是否存注册表(0 仅存内存 1 注册表+内存)
        If ssave = 0 Then GoTo ttt
              
        '是否设置自启动(修改注册表RUN项)
         Call Main
          
        '对内存变量进行注册表存储
         SaveSetting "tooboy", "e900", "ce", ce
         SaveSetting "tooboy", "e900", "n", n
         SaveSetting "tooboy", "e900", "ctime", ctime
         SaveSetting "tooboy", "e900", "etime", etime
         SaveSetting "tooboy", "e900", "rd", rd
         SaveSetting "tooboy", "e900", "psave", psave
         SaveSetting "tooboy", "e900", "ssave", ssave
         SaveSetting "tooboy", "e900", "visi", visi
         SaveSetting "tooboy", "e900", "guage", guage
         SaveSetting "tooboy", "e900", "red", red
         SaveSetting "tooboy", "e900", "mark", mark
         SaveSetting "tooboy", "e900", "xxx", 1
         SaveSetting "tooboy", "e900", "sspeed", sspeed
         'SaveSetting "tooboy", "e900", "voice", voice '不在设置窗口修改,退出软件时存盘
         'SaveSetting "tooboy", "e900", "left", Form1.left '不在设置窗口修改,退出软件时存盘
         'SaveSetting "tooboy", "e900", "guagen", guagen '不在设置窗口修改,退出软件时存盘
         

ttt: Set Form3 = Nothing
End Sub

'恢复语速为正常值150
Private Sub Label4_Click()
VScroll4.Value = 150
End Sub

'隐藏的打开烈焰红唇模式的方法(先单击设置窗口左上角再单击设置窗口右上角)
Private Sub Label5_Click()
Label6.Enabled = True
End Sub
Private Sub Label6_Click()
Label5.Enabled = False
Form3.Check2.Enabled = True
Form3.Label6.Enabled = False
usetime = 9660
Form8.Visible = True
'显示3秒烈焰红唇图片
Dim start
start = Timer
Do While Timer < start + 3
DoEvents
Loop
Unload Form8
End Sub

'设定随机、顺序播放方式时设定进度存储复选框的可用性
Private Sub Option2_Click(Index As Integer)
     If Option2(0).Value = True Then
        Check3.Enabled = False
     Else
        Check3.Enabled = True
     End If
End Sub

'试听语速
Private Sub Picture1_Click()
      txtvoice.Speed = VScroll4.Value
      txtvoice.Speak "This is a test about  the speed of speech.", vtxtst_STATEMENT
End Sub

'设定遍数及停留时间
Private Sub VScroll1_Change()
Text1(0).Text = VScroll1.Value
End Sub

Private Sub VScroll2_Change()
Text1(1).Text = VScroll2.Value
End Sub

Private Sub VScroll3_Change()
Text1(2).Text = VScroll3.Value
End Sub

⌨️ 快捷键说明

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