i have problem in displaying a single line in different line...
my code is
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TextBox5.Text = Me.ListView1.Items.Count
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = IO.File.CreateText(" E:\ " & Me.ComboBox1.Text & ".txt")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" QUOTATION ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" {0,10}{1,10}{2,25}", "Date", "Time", "year")
oWrite.WriteLine(" {0,10:dd MMMM}{0,10:hh:mm tt}{1,25:C}", Now(), 2010.33)
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" " & Me.ComboBox1.Text & "")
oWrite.WriteLine(" " & Me.GADD.Text & "")
oWrite.WriteLine(" " & Me.GFATH.Text & "")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
If Me.ListView1.Items.Count = 1 Then
For Each x As ListViewItem In Me.ListView1.Items
Me.TextBox5.Text = x.Text.Length
If x.Text.Length < 100 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
ElseIf x.Text.Length > 100 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
End If
Next
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
ElseIf Me.ListView1.Items.Count = 2 Then
For Each x As ListViewItem In Me.ListView1.Items
Me.TextBox5.Text = x.Text.Length
If x.Text.Length < 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
ElseIf x.Text.Length > 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
End If
Next
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
ElseIf Me.ListView1.Items.Count = 3 Then
For Each x As ListViewItem In Me.ListView1.Items
Me.TextBox5.Text = x.Text.Length
If x.Text.Length < 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
ElseIf x.Text.Length > 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
End If
Next
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
ElseIf Me.ListView1.Items.Count = 4 Then
For Each x As ListViewItem In Me.ListView1.Items
Me.TextBox5.Text = x.Text.Length
If x.Text.Length < 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
ElseIf x.Text.Length > 10 Then
oWrite.WriteLine(" " & x.Text & " " & x.SubItems(1).Text & " " & x.SubItems(5).Text & " " & x.SubItems(5).Text & ".00 ")
End If
Next
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
End If
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" TERMS AND CONDETION ")
oWrite.WriteLine(" The rates shown above are inclsive of taxes. ")
oWrite.WriteLine(" Delivery: Within a month from the date of receipt of your valued order ")
oWrite.WriteLine(" Price ryling at the date of supply will be applicable ")
oWrite.WriteLine(" ")
oWrite.WriteLine(" Guarantee will not apply to Tiller damaged during operation ")
oWrite.WriteLine(" with attachments other than those supplied by V.S.T. Tillers and ")
oWrite.WriteLine(" Raja Industrial Works ")
oWrite.Close()
MsgBox("Record Saved To Notepad")
End Sub
its displaying notepad file as:
QUOTATION
Date Time year
06 July 01:56 PM $2,010.33
ASDFG
SADFG
2451
1.5 Ton Capacity Trailer two wheeled fitted with the hydrolic break and 600 X 16 tyres /mechanical tipping /Non tipping 0 0.00
1.5 Ton Capacity Trailer two wheeled fitted with the hydrolic break and 600 X 16 tyres /mechanical tipping /Non tipping 2 13620 13620.00
TERMS AND CONDETION
The rates shown above are inclsive of taxes.
Delivery: Within a month from the date of receipt of your valued order
Price ryling at the date of supply will be applicable
Guarantee will not apply to Tiller damaged during operation
with attachments other than those supplied by V.S.T. Tillers and
Raja Industrial Works
I need This Thing to be like :
QUOTATION
Date Time year
06 July 01:56 PM $2,010.33
ASDFG
SADFG
2451
1.5 Ton Capacity Trailer two wheeled fitted with
the hydrolic break and 600 X 16 tyres /mechanical
tipping /Non tipping 0 0.00
1.5 Ton Capacity Trailer two wheeled fitted with
the hydrolic break and 600 X 16 tyres /mechanical
tipping /Non tipping 2 13620 13620.00
TERMS AND CONDETION
The rates shown above are inclsive of taxes.
Delivery: Within a month from the date of receipt of your valued order
Price ryling at the date of supply will be applicable
Guarantee will not apply to Tiller damaged during operation
with attachments other than those supplied by V.S.T. Tillers and
Raja Industrial Works