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

📄 thingtest_form1.frm

📁 个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4545
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4620
   LinkTopic       =   "Form1"
   ScaleHeight     =   4545
   ScaleWidth      =   4620
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Check1 
      Caption         =   "Stuck on itself"
      Height          =   285
      Left            =   1065
      TabIndex        =   5
      Top             =   3870
      Width           =   2040
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Temporary Thing"
      Height          =   330
      Left            =   1065
      TabIndex        =   4
      Top             =   2925
      Width           =   2490
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Release the Thing"
      Height          =   330
      Left            =   1065
      TabIndex        =   3
      Top             =   2070
      Width           =   2490
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Reverse the Thing’s Name"
      Height          =   330
      Left            =   1065
      TabIndex        =   2
      Top             =   1485
      Width           =   2490
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Show the Thing"
      Height          =   330
      Left            =   1065
      TabIndex        =   1
      Top             =   900
      Width           =   2490
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Create New Thing"
      Height          =   330
      Left            =   1065
      TabIndex        =   0
      Top             =   315
      Width           =   2490
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'对 Thing 对象的引用。
Private mthTest As Thing
Private WithEvents mdgs As Dialogs
Attribute mdgs.VB_VarHelpID = -1

'按钮“Create New Thing”。
Private Sub Command1_Click()
    Set mthTest = New Thing
    mthTest.Name = _
    InputBox("Enter a name for the Thing", _
    "Test Thing")
End Sub
'按钮“Show the Thing”。
Private Sub Command2_Click()
    MsgBox "Name: " & mthTest.Name, , _
    "Thing " & mthTest.DebugID
End Sub

'按钮“Reverse the Thing's Name”。
Private Sub Command3_Click()
    mthTest.ReverseName
    '通过设置值来单击“Show the Thing”。
    Command2.Value = True
End Sub

'按钮“Release the Thing”。
Private Sub Command4_Click()
    Set mthTest = Nothing
End Sub
'按钮 "Temporary Thing"。
Private Sub Command5_Click()
    Dim thTemp As New Thing
    thTemp.Name = InputBox( _
    "Enter a name for the temporary Thing", _
    "Temporary Thing")
    '如果标题为“Stuck on itself”的复选框被选中,
    '   则创建一个循环引用。
    If Check1.Value = vbChecked Then
        thTemp.StuckOnMyself = True
        'thTemp.StuckOnMyself = False
    End If
End Sub


Private Sub Form_Click()
    If mdgs Is Nothing Then
        Set mdgs = New Dialogs
    End If
    mdgs.ShowDialog Me.Caption, False
End Sub

Private Sub Form_Load()
    Me.Caption = ShowDialog(Me.Caption)
End Sub

Private Sub mdgs_NotifyClients(ByVal Data As String)
    Me.Caption = Data
End Sub

⌨️ 快捷键说明

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