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

📄 frmlike.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLike 
   Caption         =   "Operator Like"
   ClientHeight    =   2100
   ClientLeft      =   3810
   ClientTop       =   4380
   ClientWidth     =   8790
   LinkTopic       =   "Form1"
   ScaleHeight     =   2100
   ScaleWidth      =   8790
   Begin VB.ListBox lstPatterns 
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   900
      Left            =   4200
      TabIndex        =   4
      Top             =   360
      Width           =   4455
   End
   Begin VB.CommandButton cmdTest 
      Caption         =   "Like?"
      Height          =   495
      Left            =   3600
      TabIndex        =   2
      Top             =   1560
      Width           =   1215
   End
   Begin VB.TextBox txtPattern 
      Height          =   375
      Left            =   2160
      TabIndex        =   1
      Top             =   360
      Width           =   1935
   End
   Begin VB.TextBox txtString 
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   1935
   End
   Begin VB.Label lblPatDescriptions 
      Caption         =   "Pattern descriptions:"
      Height          =   255
      Left            =   4200
      TabIndex        =   7
      Top             =   120
      Width           =   2295
   End
   Begin VB.Label lblPattern 
      Caption         =   "Pattern:"
      Height          =   255
      Left            =   2160
      TabIndex        =   6
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label lblString 
      Caption         =   "String:"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   1815
   End
   Begin VB.Label lblResult 
      BorderStyle     =   1  'Fixed Single
      Height          =   495
      Left            =   360
      TabIndex        =   3
      Top             =   840
      Width           =   3495
   End
End
Attribute VB_Name = "frmLike"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 8.3
' Demonstrating operator Like
Option Explicit


Private Sub Form_Load()
   Call lstPatterns.AddItem("  ?       Any one character")
   Call lstPatterns.AddItem("  *       Multiple characters")
   Call lstPatterns.AddItem("[chars]   Any one character " & _
                            "in chars")
   Call lstPatterns.AddItem("[!chars]  Any one character " & _
                            "not in chars")
End Sub

Private Sub cmdTest_Click()
   Dim b As Boolean
   
   b = txtString.Text Like txtPattern.Text
   lblResult.Caption = txtString.Text & " Like " & _
                       txtPattern.Text & " is " & b
End Sub

⌨️ 快捷键说明

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