VERSION 5.00
Begin VB.Form frm2x2 
   Caption         =   "Programm 2x2"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox TxtResult 
      Height          =   495
      Left            =   360
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   960
      Width           =   4095
   End
   Begin VB.CommandButton CmdCalculate 
      Caption         =   "Вычисление"
      Height          =   495
      Left            =   960
      TabIndex        =   1
      Top             =   1680
      Width           =   2775
   End
   Begin VB.CommandButton CmdExit 
      Caption         =   "Выход"
      Height          =   495
      Left            =   1800
      TabIndex        =   0
      Top             =   2400
      Width           =   1215
   End
   Begin VB.Label LblResult 
      Caption         =   "Результат"
      Height          =   495
      Left            =   480
      TabIndex        =   3
      Top             =   120
      Width           =   2535
   End
End
Attribute VB_Name = "frm2x2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Все переменные надо объявлять заранее
Option Explicit

Private Sub CmdCalculate_Click()
Multiply 2, 2
End Sub

Private Sub CmdExit_Click()
End
End Sub



Public Sub Multiply(x As Integer, y As Integer)
Dim z
z = x * y
TxtResult.Text = Str(z)

End Sub

