Сначала вам нужно будет сначала получить все текстовые данные из файлов * .txt, это легко сделать с помощью IO.File.ReadAllText .
Далее вы захотите убедиться, что полученные данные являются действительными целыми числами, это легко сделать с помощью Integer.TryParse .
Наконец, вы захотите получить наибольшее значение, поскольку все они являются числовыми значениями, просто используйте метод Enumerable.Max . Вот быстрый пример:
'Get all of the text from the desired file and assign it to the respective TextBox
TextBox1.Text = IO.File.ReadAllText("file1.txt")
TextBox2.Text = IO.File.ReadAllText("file2.txt")
TextBox3.Text = IO.File.ReadAllText("file3.txt")
TextBox4.Text = IO.File.ReadAllText("file4.txt")
'Check which TextBox has the highest value by first check if all are valid Integer values
Dim tb1, tb2, tb3, tb4 As Integer
If Integer.TryParse(TextBox1.Text, tb1) AndAlso
Integer.TryParse(TextBox2.Text, tb2) AndAlso
Integer.TryParse(TextBox3.Text, tb3) AndAlso
Integer.TryParse(TextBox4.Text, tb4) Then
'Get the highest value
Dim highest As Integer = {tb1, tb2, tb3, tb4}.Max()
'Do your command based on the highest value
If ... Then
End If
Else
MessageBox.Show("One or more of the text files contain a value that cannot be converted into an Integer. Please check the files and try again.", "Invalid Data", MessageBoxButtons.OK)
End If