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

📄 article.frm

📁 英语学习助手
💻 FRM
字号:
VERSION 5.00
Begin VB.Form article 
   Caption         =   "短文翻译"
   ClientHeight    =   4830
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   4830
   ScaleWidth      =   5775
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      TabIndex        =   3
      Top             =   3960
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "执行翻译"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      TabIndex        =   2
      Top             =   1800
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   240
      TabIndex        =   1
      Top             =   840
      Width           =   5175
   End
   Begin VB.Label Label2 
      Height          =   1095
      Left            =   240
      TabIndex        =   4
      Top             =   2400
      Width           =   5295
   End
   Begin VB.Label Label1 
      Caption         =   "请输入要翻译的短文:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   2175
   End
End
Attribute VB_Name = "article"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As DAO.Database
Dim rec As DAO.Recordset
Private Sub Command1_Click()
    tx = Text1.Text
    i = 1
    l = Len(tx)
    txt = ""
    txtra = ""
    Do While i <= l + 1
        If i <= l Then
        ch = Mid(tx, i, 1)
        End If
        If ch <> " " And i <> l Then
            txt = txt & ch
        Else
            If i = l Then
                txt = txt & ch
            End If
            Set rec = db.OpenRecordset("select * from word where 单词='" & txt & "'")
            If rec.RecordCount <> 0 Then
                txtra = rec!翻译
            Else
                txtra = txt
            End If
            Label2.Caption = Label2.Caption & txtra
            txt = ""
            txtra = ""
        End If
        i = i + 1
    Loop
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Set db = OpenDatabase(App.Path & "\sourse.mdb")
    Set rec = db.OpenRecordset("word")
End Sub

⌨️ 快捷键说明

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