Учебное пособие: Задачи линейного программирования
Else
x(i, j - 1) = xn(i)(j - 1)
grdData.Text = Str(x(i, j - 1))
End If
Next j
Next i
grdData.Cols = n + 2
grdData.Rows = r + 2
grdData.Col = 0
grdData.Row = 0
grdData.Text = "Св. член"
For i = 1 To n + 1
grdData.Col = i
grdData.Text = "X" & Str(i)
Next i
grdData.Col = 0
grdData.Row = r + 1
grdData.Text = "Fmin"
End Sub
'Private Sub grdData_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyDelete Or KeyCode = vbKeyBack) Or (Len(grdData.Text) = 2 And grdData.Col = 0) Then
grdData.Text = ""
End If
End Sub
Private Sub grdData_KeyPress(KeyAscii As Integer)
If (KeyAscii >= 48 And KeyAscii <= 57 And grdData.Col = 0) Then
If Chr(KeyAscii) <= n Then
If grdData.Row <= r Then
grdData.Text = " "