Hello. Scanner project is going well. One last problem to solve, which I though I did before....
-------------
Text gets recorded in my data file like:
ABC DEF
I need it to be recorded as:
ABC
DEF
----
I thought adding VBCRLF would solve this problem and it did in the past but this time it does not seem to be working. ANy advice would be appreciated.
VB.NET:
[COLOR=Blue]Private Sub[/COLOR][SIZE=2] Scanner1_ScanCompleteEvent([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] Object[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] PsionTeklogix.Barcode.ScanCompleteEventArgs)[/SIZE]
[SIZE=2]txtlastcode.Text = txtBarcode.Text[/SIZE]
[SIZE=2]txtBarcode.Text = e.Text[/SIZE]
[SIZE=2]StatusBar1.Text = [/SIZE][SIZE=2][COLOR=#800000]"Scan successful"[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] sw [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.IO.StreamWriter(sourcefile, [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=2], System.Text.Encoding.ASCII)[/SIZE]
[SIZE=2]sw.Write(txtBarcode.Text & vbCrLf)[/SIZE]
[SIZE=2]sw.Close()[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]Debug.Write(ex.Message)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] Try[/COLOR][/SIZE]
Text gets recorded in my data file like:
ABC DEF
I need it to be recorded as:
ABC
DEF
----
I thought adding VBCRLF would solve this problem and it did in the past but this time it does not seem to be working. ANy advice would be appreciated.
Last edited by a moderator: