VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1 
   Caption         =   "Список"
   ClientHeight    =   6300
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9225
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   6300
   ScaleWidth      =   9225
   StartUpPosition =   2  'CenterScreen
   Begin MSComDlg.CommonDialog Dlg2 
      Left            =   960
      Top             =   5520
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      CancelError     =   -1  'True
      DialogTitle     =   "Сохранение списка"
      Filter          =   "*.txt"
      FontBold        =   -1  'True
      FontItalic      =   -1  'True
      FontStrikeThru  =   -1  'True
      FontUnderLine   =   -1  'True
      Max             =   24
      Min             =   8
   End
   Begin MSComDlg.CommonDialog Dlg1 
      Left            =   480
      Top             =   5520
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      CancelError     =   -1  'True
      DialogTitle     =   "Загрузка списка"
      Filter          =   "*.txt"
      FontBold        =   -1  'True
      FontItalic      =   -1  'True
      FontStrikeThru  =   -1  'True
      FontUnderLine   =   -1  'True
      Max             =   24
      Min             =   8
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Сохранить"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4680
      TabIndex        =   4
      ToolTipText     =   "Сохранение списка"
      Top             =   5640
      Width           =   1215
   End
   Begin VB.CommandButton Cmd4 
      Caption         =   "Очистка"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3240
      TabIndex        =   3
      ToolTipText     =   "Удаление списка"
      Top             =   5640
      Width           =   1215
   End
   Begin VB.CommandButton Cmd2 
      Caption         =   "Загрузить"
      BeginProperty Font 
         Name            =   "Georgia"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   6120
      TabIndex        =   2
      ToolTipText     =   "Загрузка списка"
      Top             =   5640
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      DragIcon        =   "ТТ.frx":0000
      Height          =   5055
      Left            =   120
      TabIndex        =   1
      ToolTipText     =   "Mouse_Click"
      Top             =   120
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   8916
      _Version        =   393216
      Rows            =   20
      Cols            =   7
      BackColor       =   16777152
      BackColorFixed  =   8454016
      WordWrap        =   -1  'True
      TextStyleFixed  =   3
      AllowUserResizing=   3
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Выход "
      BeginProperty Font 
         Name            =   "Monotype Corsiva"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7560
      TabIndex        =   0
      Top             =   5640
      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
Dim метка, rfiles, nc As String, sts, nr, i, j, r, k, MouseCol, MouseRow As Integer, im(1 To 20, 1 To 7) As String

Private Sub Cmd2_Click()
i = 0
r = 0
nr = 0
nc = ""
sts = 1
On Error GoTo метка

Dlg1.ShowOpen
 rfiles = Dlg1.FileName

Open rfiles For Input As #1
k = 0
i = 1
Do Until EOF(1)
Input #1, nc
    k = k + 1

If k > 6 Then
   k = 1
   i = i + 1
 sts = sts + 1
End If
   
  im(i, k) = nc
  r = i
  
Loop
Close #1
For i = 1 To r
  Grid1.Row = i
For j = 1 To 6
Grid1.Col = j
  Grid1.Text = im(i, j)
Next
Next
Form1.Cls
    Form1.CurrentY = 5450
    Form1.Print " Файл загружен"

метка:

End Sub

Private Sub Cmd3_Click()

End Sub

Private Sub Cmd4_Click()
Grid1.Clear
Grid1.Row = 0
Grid1.Col = 1
Grid1.Text = "Фамилия, имя"

Grid1.Col = 2
Grid1.Text = "Баллов"

Grid1.Col = 3
Grid1.Text = "Набрано"

Grid1.Col = 4
Grid1.Text = "Ошибок"

Grid1.Col = 5
Grid1.Text = "Оценка"

Grid1.Col = 6
Grid1.Text = "Время(мин:сек)"
Grid1.Col = 0

For i = 0 To 19
  Grid1.Row = i
  Grid1.Text = Str(i)
Next
Form1.Cls
    Form1.CurrentY = 5450
    Form1.Print " Список удалён"

End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
i = 0
j = 0
k = 6
On Error GoTo метка

Dlg2.ShowSave
 rfiles = Dlg2.FileName

Open rfiles For Output As #1
  For i = 1 To sts
   For j = 1 To k
    Print #1, im(i, j)
   Next
  Next
 Close #1
    Form1.Cls
    Form1.CurrentY = 5450
    Form1.Print " Файл сохранён"
метка:
End Sub

Private Sub Form_Click()
Grid1.Row = 0
Grid1.Col = 1
Grid1.Text = "Фамилия, имя"

Grid1.Col = 2
Grid1.Text = "Баллов"

Grid1.Col = 3
Grid1.Text = "Набрано"

Grid1.Col = 4
Grid1.Text = "Ошибок"

Grid1.Col = 5
Grid1.Text = "Оценка"

Grid1.Col = 6
Grid1.Text = "Время(мин:сек)"
Grid1.Col = 0

Grid1.Col = 0
Grid1.ColWidth(0) = 400
Grid1.ColWidth(1) = 1700

For i = 2 To 6
Grid1.ColWidth(i) = 1300
Next

For i = 0 To 19
  Grid1.RowHeight(i) = 300
  Grid1.Row = i
 
 Grid1.Text = Str(i)
Next


End Sub

Private Sub Form_Load()
Grid1.Row = 0
Grid1.Col = 1
Grid1.Text = "Фамилия, имя"

Grid1.Col = 2
Grid1.Text = "Баллов"

Grid1.Col = 3
Grid1.Text = "Набрано"

Grid1.Col = 4
Grid1.Text = "Ошибок"

Grid1.Col = 5
Grid1.Text = "Оценка"

Grid1.Col = 6
Grid1.Text = "Время(мин:сек)"
Grid1.Col = 0

Grid1.Col = 0
Grid1.ColWidth(0) = 400
Grid1.ColWidth(1) = 1700

For i = 2 To 6
Grid1.ColWidth(i) = 1300
Next

For i = 0 To 19
  Grid1.RowHeight(i) = 300
  Grid1.Row = i
 
 Grid1.Text = Str(i)
Next

End Sub

Private Sub Grid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error GoTo метка
Form1.Cls
    Form1.CurrentY = 5450
    Form1.Print " Режим ввода списка"

x = Grid1.MouseRow
y = Grid1.MouseCol
'x = Int(x / 1800)
'y = Int(y / 300)

im(x, y) = InputBox("Введите слово", "ВВОД")
Grid1.Row = x
Grid1.Col = y
Grid1.Text = im(x, y)
If sts < x Then sts = x
метка:
End Sub
Private Sub проверка()



End Sub
