Home > Net >  O text copy a blank line or do the problem of insufficient number of characters to stop
O text copy a blank line or do the problem of insufficient number of characters to stop

Time:11-09

There are two problems with the following statement:
1, in an empty row, the program stops, guide TextBox9. All Text path TXT file cannot be copy to TextBox11. The amount of Text file;
2, encounter less than stop digits, such as replication TextBox9. The Text file before 11 in a row, such as the bank is less than 11 will also stop;

I want to achieve:
1, empty rows to skip, continue to copy the next line;
Line 2, encounter characters digits is insufficient, the full amount of copy, how much a copy how much;
3, the following program begins with the first line of copy, I'd like to change to begin from the second line copy,

Cattle genuflect is begged help change statements,

Private Sub Button9_Click (sender As Object, As EventArgs e) Handles Button9. Click
If (TextBox11. Text="") Or (TextBox10. Text=" ") Or (TextBox9. Text="") Then
MsgBox (" please check the file, the name, object library table is complete!" )
The Else
Dim temp As String
Dim f1 As StreamReader=File. OpenText (TextBox9. Text)
Dim f2 As StreamWriter=File. AppendText (TextBox11. Text)
Temp=f1. ReadLine
While temp & lt;> "
"F2. WriteLine ((temp. The Substring (0, 2) + (" | "+ Now (). The Date. ToString (" yyyymmdd") + "|" + TextBox10. Text)))
Temp=f1. ReadLine
End While
F1. The Dispose ()
F2. The Dispose ()
MsgBox (" library is complete, please see the object library, the change of the number of rows, to determine whether the data is normal warehousing!" )
End the If
End Sub
  • Related