VERSION 5.00
Begin VB.Form frmButton 
   Caption         =   "Button"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtResult 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   495
      Left            =   480
      MultiLine       =   -1  'True
      TabIndex        =   1
      Top             =   720
      Width           =   3975
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "Exit"
      Height          =   495
      Left            =   3240
      TabIndex        =   0
      Top             =   2640
      Width           =   1215
   End
   Begin VB.Label lblinstructions 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "Нажмите одну из кнопок мыши"
      Height          =   195
      Left            =   1320
      TabIndex        =   2
      Top             =   360
      Width           =   2415
   End
End
Attribute VB_Name = "frmButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
End
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'нажата левая кнопка?
If Button = 1 Then
txtResult.Text = "нажата левая кнопка"
End If

'нажата правая кнопка?
If Button = 2 Then
txtResult.Text = "нажата правая кнопка"
End If

'нажата средняяя кнопка?
If Button = 4 Then
txtResult.Text = "нажата средняя кнопка"
End If


End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
txtResult.Text = ""
End Sub
