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:
Declare Function SendMessageString Lib "USER32" _ Alias "SendMessageA" (ByVal hwnd As Integer, _ ByVal wMsg As Integer, ByVal wParam As Integer, _ ByVal lParam As StringBuilder) As Integer Public Function GetLastLineTextChat(ByVal hwnd As Integer) As String Dim iLastLine As Integer Dim strBuffer As New StringBuilder(255) 'Get Line count iLastLine = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0) 'get line text Call SendMessageString(hwnd, EM_GETLINE, iLastLine - 2, strBuffer) Return strBuffer.ToString End Function Private Sub Command1_Click() Dim sChatText as String = GetLastLineTextChat(ReadTxtHnd) End Sub


Reply With Quote