aria
New member
- Joined
- Feb 3, 2022
- Messages
- 1
- Programming Experience
- Beginner
i want to make a program to compare the code/serial number, the code is entered into a txt file which will be displayed in textbox 1 and when the serial number is entered into textbox 2 it will automatically (realtime) adjust/match the serial number in textbox 1 (txt files) while displayed.
I have made it, but the contents of the txt file are displayed entirely in textbox 1. this my code
this image program
I have made it, but the contents of the txt file are displayed entirely in textbox 1. this my code
VB.NET:
Sub readtxt()
Dim rf As New IO.StreamReader("D:\PROJECT\latihan.txt")
Dim r As String
Do Until rf.EndOfStream
r = rf.ReadLine
TextBox1.Text = TextBox1.Text & r & vbCrLf
Loop
rf.Close()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = TextBox2.Text Then
MsgBox("Nomor Seri Sama", MsgBoxStyle.Information)
Else
MsgBox("Nommor Seri Berbeda", MsgBoxStyle.Critical)
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Call readtxt()
End Sub
this image program

