Analysis of Line Wrap and No Line Wrap in print output in VB language
The analysis of line wrapping and non-line wrapping in print output in VB language. In order to solve this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
On the emphasis on line wrapping and non-line wrapping in print output
Newline symbol
\ r carriage return return
\ nLine feed character
\ r\ nLinefeed + enter
Chr (10) newline character\ n
Chr (13) carriage return\ r
Vbcrlf enter
Use the & symbol to connect with a newline character
Why do you change careers?
Because print has its own line feeds.
If you want to concatenate two consecutive print output characters to one line, use; separate to connect
The same symbols, including newline characters and connectors, can be used in debug.print (output only in the "now" window, only for debugging purposes)
What is me?
Me represents the current form
AutoRedraw = True means that the print output in the window is automatically refreshed
The program interface of this issue:
Running effect:
Source code for this issue:
Private Sub Form_KeyDown (KeyCode As Integer, Shift As Integer) Print KeyCodeEnd Sub
Private Sub Form_Load () ShowAutoRedraw = True'Me.FillStyle = vbSolid'Me.FillColor = & H0&'Me.ForeColor = & HFFFFFFForm1.FontSize = 30
Print "Spring is so good to sleep and daybreak unwittingly" & Chr (10) & "suddenly wake up and there are birds singing everywhere."
Print "there seems to be wind and rain at night," & vbCrLf & "I don't know how many wind and rain flowers have fallen."
Debug.Print programming by Liu Jinyu & Chr (13) & http://ljy.kim"
Picture1.Print "the Zero Foundation of Liu Jinyu" & vbCrLf & "VB course 001"
End Sub
This is the answer to the analysis of line wrapping and non-line wrapping in print output in VB language. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.