web development India freelance website designer
Extract the contents of a text box that has been set to multiline, line by line

Public Const EM_EMPTYUNDOBUFFER = 205
Public Const EM_CANUNDO = 198
Public Const EM_GETMODIFY = 184
Public Const EM_SETMODIFY = 185
Public Const EM_UNDO = 199

Public Const EM_CANPASTE = 1074
Public Const EM_FINDTEXT = 1080

Public Const EM_GETFIRSTVISIBLELINE = 206
Public Const EM_GETLINECOUNT = 186
Public Const EM_GETLINE = 196
Public Const EM_LINEFROMCHAR = 201
Public Const EM_LINEINDEX = 187
Public Const EM_LINELENGTH = 193

Public Const EM_EXLINEFROMCHAR = 1078
Public Const EM_LINESCROLL = 182
Public Const EM_SCROLLCARET = 183
Public Const EM_SETTABSTOPS = 203


Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Integer, ByVal lparam As Long) As Long

Dim sFileName As String
Dim Lines
Dim WinH As Long
Dim i As Integer
Dim LineLength As Long
Dim charOffset As Long

'Get the windows handle of the multiline text box
WinH = txtFileName.hWnd

'Get the number of lines in the mutiline text box called txtFileName
Lines = SendMessage(WinH, EM_GETLINECOUNT, 0, 0)

For i = 0 To Lines - 1

'Retrieve the offset of first character in the line
charOffset = SendMessage(WinH, EM_LINEINDEX, i, 0)
'Now get the length of the line
LineLength = SendMessage(WinH, EM_LINELENGTH, charOffset, 0)
'Debug.Print LineLength
sFileName = Mid$(txtFileName.Text, charOffset + 1, LineLength)
Debug.Print sFileName

Next i
Extract the contents of a text box that has been s

1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550

Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design