【VB开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VB开源代码-Ex6_14.frm的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
VERSION 5.00
Begin VB.Form Ex6_14
Caption = "Form1"
ClientHeight = 2925
ClientLeft = 60
ClientTop = 450
ClientWidth = 3195
LinkTopic = "Form1"
ScaleHeight = 2925
ScaleWidth = 3195
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "临时的Thing"
Height = 375
Left = 360
TabIndex = 3
Top = 2160
Width = 2175
End
Begin VB.CommandButton Command3
Caption = "创建新的Thing"
Height = 375
Left = 360
TabIndex = 2
Top = 1560
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "颠倒该Thing的名称"
Height = 375
Left = 360
TabIndex = 1
Top = 960
Width = 2175
End
Begin
VB.CommandButton Command1
Caption = "显示该Thing"
Height = 375
Left = 360
TabIndex = 0
Top = 360
Width = 2175
End
End
Attribute VB_Name = "Ex6_14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mth As Thing
Private Sub Form_Load()
Set mth = New Thing
mth.Name = InputBox("Enter a name for the Thing")
End Sub
'按钮“显示该 Thing”
Private Sub Command1_Click()
MsgBox "Name: " & mth.Name & vbCrLf _
& "Created: " & mth.Created, , "Form Thing"
End Sub
'按钮“颠倒该 Thing 的名称”
Private Sub Command2_Click()
mth.ReverseName
'单击“显示该 Thing”
Command1.Value = True
End Sub
'按钮“创建新的 Thing”
Private Sub Command3_Click()
Set mth = New Thing
mth.Name = InputBox( _
"Enter a name for the new Thing")
End Sub
'按钮“临时的 Thing”。
Private Sub Command4_Click()
Dim thTemp As New Thing
thTemp.Name = InputBox( _
"Enter a name for the Temporary Thing")
End Sub