11-12-13, 11:33 PM
تفضل اخي
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox2.Multiline = True
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim txt1 As String = Trim(TextBox1.Text)
Dim i As Integer
Dim spac As Boolean = True
Do While i <= txt1.Length - 1
If txt1(i) <> " " Then
TextBox2.Text = TextBox2.Text & txt1(i)
spac = True
ElseIf spac = True Then
TextBox2.Text = TextBox2.Text & vbNewLine
spac = False
End If
i += 1
Loop
End Sub
End Class
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox2.Multiline = True
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim txt1 As String = Trim(TextBox1.Text)
Dim i As Integer
Dim spac As Boolean = True
Do While i <= txt1.Length - 1
If txt1(i) <> " " Then
TextBox2.Text = TextBox2.Text & txt1(i)
spac = True
ElseIf spac = True Then
TextBox2.Text = TextBox2.Text & vbNewLine
spac = False
End If
i += 1
Loop
End Sub
End Class

