Set tab stop positions for a multiline TextBox control
By default, multiline TextBox controls insert a tab stop position every 8 characters; in other words, if you press the Ctrl+Tab key while the focus is inside a multiline TextBox
By default, multiline TextBox controls insert a tab stop position every 8 characters; in other words, if you press the Ctrl+Tab key while the focus is inside a multiline TextBox
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst EM_LINEFROMCHAR = &HC9Const
Setting a multiline TextBox’s SelStart property doesn’t ensure that the insertion point (the caret) is visible. You can achieve this by sending the control an appropriate message: Private Declare Function
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst EM_LINESCROLL = &HB6′
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst EM_FMTLINES = &HC8′
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst EM_LINEINDEX = &HBBConst