Hi all .could any one help me convert the following code from vb 2008 to vb6 ? All it does reads text line from a chat room application. Looking forward for replies.Thanks


3 Code:
  1. Declare Function SendMessageString Lib "USER32" _
  2. Alias "SendMessageA" (ByVal hwnd As Integer, _
  3. ByVal wMsg As Integer, ByVal wParam As Integer, _
  4. ByVal lParam As StringBuilder) As Integer
  5.  
  6. Public Function GetLastLineTextChat(ByVal hwnd As Integer) As String
  7.     Dim iLastLine As Integer
  8.     Dim strBuffer As New StringBuilder(255)
  9.     'Get Line count
  10.     iLastLine = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0)
  11.     'get line text
  12.     Call SendMessageString(hwnd, EM_GETLINE, iLastLine - 2, strBuffer)
  13.     Return strBuffer.ToString
  14. End Function
  15.  
  16.  
  17. Private Sub Command1_Click()
  18. Dim sChatText as String = GetLastLineTextChat(ReadTxtHnd)
  19. End Sub