高分诚求 vb兑现记事本中的自动换行实现代码

高分诚求 vb实现记事本中的自动换行实现代码
vb实现记事本中的自动换行实现代码,这要求和windows自带的记事本中,格式->自动换行的功能一模一样,(有对checkbox的那种),这是个老问题了,我看到网上并没有实质性的解决方案,望大神解救。

------解决方案--------------------
TextBox不是有WordWrap属性吗,设定为True时就可以自动换行。
------解决方案--------------------
试试,网上找到的内容:

SetRichTextBoxWordWrap - Set the WordWrap style of a RichTextBox control
VB code

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
Private Const WM_USER As Long = &H400
Private Const EM_SETTARGETDEVICE As Long = WM_USER + 72
' Enable/Disable the WordWrap style of a RichTextBox control
'
' Example:
' Private Sub Check1_Click()
' SetRichTextBoxWordWrap RichTextBox1, (Check1.Value = vbChecked)
' End Sub
Sub SetRichTextBoxWordWrap(ByVal ctlRichText As RichTextBox, _
Optional ByVal bState As Boolean = True)
SendMessage ctlRichText.hwnd, EM_SETTARGETDEVICE, 0, CLng(IIf(bState, 0, 1))
End Sub