SearchString




Public Const WM_USER = &H400
Public Const EM_GETLINESTRING = WM_USER + 20
Function GetTextLine (X As TextBox, NumeroLinea As Integer) As String
Const BLEN = 1028
Dim ret as Long
Dim Buffer As String * BLEN
Mid(Buffer,1,1) = Chr(BLEN And &HFF)
Mid(Buffer,2,1) = Chr(BLEN \ &H100)
If Not X.Multiline Then
GetTextLine = X.Text
Else
ret=sendmessage(x.hWnd,EM_GETLINESTRING,NumeroLinea -1,ByVal Buffer)
If ret Then
GetTextLine = Left$(Buffer,ret)
Else
GetTextLine = ""
End If
End If
End Function











( searchstring.html )- by Paolo Puglisi - Modifica del 17/12/2023