VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frm1 
   BackColor       =   &H00FF8080&
   Caption         =   "Текстовый редактор"
   ClientHeight    =   3204
   ClientLeft      =   3876
   ClientTop       =   3168
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3204
   ScaleWidth      =   4680
   Begin ComctlLib.Toolbar tbrToolbar 
      Align           =   1  'Align Top
      Height          =   336
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   4680
      _ExtentX        =   8255
      _ExtentY        =   593
      Appearance      =   1
      ImageList       =   "imlToolBar"
      _Version        =   327682
      BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7} 
         NumButtons      =   4
         BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Cut"
            Object.Tag             =   ""
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Copy"
            Object.Tag             =   ""
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Paste"
            Object.Tag             =   ""
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Del"
            Object.Tag             =   ""
            ImageIndex      =   4
         EndProperty
      EndProperty
   End
   Begin VB.TextBox txtEdit 
      Height          =   1695
      Left            =   240
      MultiLine       =   -1  'True
      TabIndex        =   0
      Top             =   1200
      Width           =   4215
   End
   Begin ComctlLib.ImageList imlToolBar 
      Left            =   2760
      Top             =   480
      _ExtentX        =   804
      _ExtentY        =   804
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   4
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frm1.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frm1.frx":0112
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frm1.frx":0224
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frm1.frx":0336
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Menu mnuFile 
      Caption         =   "Файл"
      Begin VB.Menu mnuExit 
         Caption         =   "Выход"
      End
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "Правка"
      Begin VB.Menu mnuEditCut 
         Caption         =   "Вырезать"
      End
      Begin VB.Menu mnuEditCopy 
         Caption         =   "Копировать"
      End
      Begin VB.Menu mnuEditPaste 
         Caption         =   "Вставить"
      End
      Begin VB.Menu mnuEditDel 
         Caption         =   "Удалить"
      End
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub mnuEditCut_Click()
' Очистить Буфер обмена.
Clipboard.Clear
' Скопировать выделенный тест в Буфер обмена.
Clipboard.SetText frm1.txtEdit.SelText
' Удалить выделенный текст.
frm1.txtEdit.SelText = ""
End Sub
Private Sub mnuEditCopy_Click()
' Очистить Буфер обмена.
Clipboard.Clear
' Скопировать выделенный тест в Буфер обмена.
Clipboard.SetText frm1.txtEdit.SelText
End Sub
Private Sub mnuEditPaste_Click()
' Вставить текст из Буфера обмена.
frm1.txtEdit.SelText = Clipboard.GetText()
End Sub
Private Sub mnuEditDel_Click()
' Удалить выделенный текст.
frm1.txtEdit.SelText = ""
End Sub
Private Sub mnuExit_Click()
End
End Sub
Private Sub tbrToolbar_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button.Key
Case Is = "Cut"
Clipboard.Clear
Clipboard.SetText frm1.txtEdit.SelText
frm1.txtEdit.SelText = ""
Case Is = "Copy"
Clipboard.Clear
Clipboard.SetText frm1.txtEdit.SelText
Case Is = "Paste"
frm1.txtEdit.SelText = Clipboard.GetText()
Case Is = "Del"
frm1.txtEdit.SelText = ""
End Select
End Sub

