VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Programm SUM"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton CmdSumit 
      Caption         =   "Суммирование"
      Height          =   495
      Left            =   1800
      TabIndex        =   3
      Top             =   1560
      Width           =   1815
   End
   Begin VB.VScrollBar vsbNum 
      Height          =   2055
      Left            =   840
      Max             =   500
      Min             =   1
      TabIndex        =   2
      Top             =   1080
      Value           =   1
      Width           =   255
   End
   Begin VB.TextBox txtResult 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   495
      Left            =   2520
      MultiLine       =   -1  'True
      TabIndex        =   1
      Top             =   120
      Width           =   1815
   End
   Begin VB.CommandButton CMDExit 
      Caption         =   "EXIT"
      Height          =   495
      Left            =   1800
      TabIndex        =   0
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Label LbLNum 
      Caption         =   "Label1"
      Height          =   495
      Left            =   360
      TabIndex        =   4
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub CMDExit_Click()
End
End Sub

Private Sub CmdSumit_Click()
Dim i
Dim r
For i = 1 To vsbNum.Value Step 1
r = r + i
Next
txtResult.Text = Str(r)
End Sub

Private Sub vsbNum_Change()
LbLNum = "выбранное число: " + Str(vsbNum.Value)
End Sub

Private Sub vsbNum_Scroll()
vsbNum_Change
End Sub
