Option Explicit
Private Const WM_USER = &H400
Private Const EM_SETTARGETDEVICE = (WM_USER + 72)
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Private Sub cmdTry_Click()
SendMessageLong RichTextBox.hwnd, EM_SETTARGETDEVICE, 0, 1
MsgBox "No Word Wrap!"
SendMessageLong RichTextBox.hwnd, EM_SETTARGETDEVICE, 0, 0
MsgBox "Word Wrap On!"
End Sub
Private Sub Form_Load()
RichTextBox.Text = "The quick brown fox" & _
"jumps over the lazy dog. See how you can" & _
"turn the word wrap on and off, on and off." & _
vbNewLine & "Now a new line goes on!"
End Sub
Потому, что реализация контрола RTB для делфи отличается от виби
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 21