VERSION 5.00
Begin VB.Form form1 
   Caption         =   "复制与移动"
   ClientHeight    =   3480
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5070
   LinkTopic       =   "Form1"
   ScaleHeight     =   3480
   ScaleWidth      =   5070
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdStop 
      Caption         =   "停用按钮"
      Height          =   615
      Left            =   3960
      TabIndex        =   5
      Top             =   2760
      Width           =   855
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      DisabledPicture =   "form1.frx":0000
      Height          =   615
      Left            =   2760
      Picture         =   "form1.frx":0642
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   2760
      Width           =   735
   End
   Begin VB.CommandButton cmdCopy 
      Caption         =   "复制"
      DisabledPicture =   "form1.frx":0E04
      DownPicture     =   "form1.frx":1446
      Height          =   615
      Left            =   1560
      Picture         =   "form1.frx":1DB8
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2760
      Width           =   735
   End
   Begin VB.CommandButton cmdMove 
      Caption         =   "移动"
      DisabledPicture =   "form1.frx":2586
      DownPicture     =   "form1.frx":2BC8
      Height          =   615
      Left            =   240
      Picture         =   "form1.frx":353A
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   2760
      Width           =   735
   End
   Begin VB.TextBox Text2 
      Height          =   2295
      Left            =   2640
      MultiLine       =   -1  'True
      TabIndex        =   1
      Text            =   "form1.frx":3D9C
      Top             =   120
      Width           =   2175
   End
   Begin VB.TextBox Text1 
      Height          =   2295
      Left            =   240
      MultiLine       =   -1  'True
      TabIndex        =   0
      Text            =   "form1.frx":3DA2
      Top             =   120
      Width           =   2175
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim f As Boolean                    '定义标志变量，用于存储按钮是否为可用状态

Private Sub cmdCopy_Click()         '复制文本框内容
    Text2.Text = Text1.Text
End Sub

Private Sub cmdDel_Click()
    Text1.Text = ""                 '清空文本框内容
End Sub

Private Sub cmdMove_Click()         '移动文本框内容
    Text2.Text = Text1.Text
    Text1.Text = ""
End Sub

Private Sub cmdStop_Click()
    If f = False Then
        cmdMove.Enabled = False     '使按钮控件不可用
        cmdCopy.Enabled = False
        cmdDel.Enabled = False
        cmdStop.Caption = "启用按钮"
        f = True
    Else
        cmdMove.Enabled = True      '使按钮可用
        cmdCopy.Enabled = True
        cmdDel.Enabled = True
        cmdStop.Caption = "停用按钮"
        f = False
    End If
End Sub

Private Sub Form_Load()
    f = False                       '初始化标志变量
End Sub

