If text1.text <> text2.text then
msgbox "Los textos son diferentes"
end if
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If "C:\t1.txt" <> "D:\t2.txt" Then
MsgBox("Los textos son diferentes")
End If
End Sub
Sub Comparar()
Dim Reg_1 As String, Reg_2 As String
Open "C:\Tmp\Prueba.txt" For Binary As #1
Reg_1 = Space(LOF(1))
Get #1, , Reg_1
Close #1
Open "C:\Tmp\Prueba2.txt" For Binary As #1
Reg_2 = Space(LOF(1))
Get #1, , Reg_2
Close #1
If Reg_1 = Reg_2 Then
MsgBox "Los ficheros son IGUALES"
Else
MsgBox "Los ficheros son DISTINTOS"
End If
End Sub