VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

text object line info

Damien McGivern  (3 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

The first function returns usefull information about text box objects. these include :
[Line count] = 0
[Cursor Position] = 1
[Current Line Number] = 2
[Current Line Start] = 3
[Current Line End] = 4
[Current Line Length] = 5
[Current Line Cursor Position] = 6
[Line Start] = 7
[Line End] = 8
[Line Length] = 9
The next function returns the text of a given line of a text box object.

Inputs
Public Enum LineInfo [Line count] = 0 [Cursor Position] = 1 [Current Line Number] = 2 [Current Line Start] = 3 [Current Line End] = 4 [Current Line Length] = 5 [Current Line Cursor Position] = 6 [Line Start] = 7 [Line End] = 8 [Line Length] = 9 End Enum Public Function getLineInfo(txtObj As Object, info As LineInfo, Optional lineNumber As Long) As Long Public Function GetLineText(txtObj As Object, lineNumber As Long) As String '// If lineNumber = 0 then current line's text is given

API Declarations
Public 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
Public Const EM_GETSEL As Long = &HB0
Public Const EM_SETSEL As Long = &HB1
Public Const EM_GETLINECOUNT As Long = &HBA
Public Const EM_LINEINDEX As Long = &HBB
Public Const EM_LINELENGTH As Long = &HC1
Public Const EM_LINEFROMCHAR As Long = &HC9
Public Const EM_SCROLLCARET As Long = &HB7
Public Const WM_SETREDRAW As Long = &HB

Rate text object line info (3(3 Vote))
text object line info.bas

text object line info Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters