Public Class Form1
Dim WCount As Integer = 0
-----------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Label2.Text = ""
Dim mark(3) As Integer
Dim Stud(100) As String
Dim s As String
Dim M As Integer = 0
Try
Do
s = TextBox1.Text
If s = "-1" Then
MessageBox.Show("You end the insert operation",
"Finish")
Me.Close()
Exit Do
End If
Do
M = M + 1
mark(M) = InputBox("Insert The Marke btween(0-
100)", "Marks")
Label2.Text = M.ToString
If mark(M) > 100 Or mark(M) < 0 Then
MessageBox.Show("you insert wrong value!",
"Error")
Label2.Text = (M - 1).ToString
Exit Do
End If
Loop Until M > 2
WCount += 1
Stud(WCount) = TextBox1.Text
Label1.Text = WCount.ToString
If s = s Then
Exit Do
End If
Loop While s = s
Catch ex As Exception
MessageBox.Show("you cancel the insert operation",
"!!!!!!!!!!")
End Try
End Sub
-----------------------------------------------------------------------
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class