I just changed my code from using SendMessage to PostMessage. PostMessage is working fine when it sends the messages to 'click' a button, but the first PostMessage line, where it sends text to and "Edit" class, the text is not sent at all. Anyone have any ideas?
Below are my PostMessage declaration, and it's usage. hWndTextBox contains the correct handle, WM_SETTEXT = 12, sItems(i) = "01541234"
Code:Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As IntegerCode:PostMessage(hWndTextBox, WM_SETTEXT, 0&, sItems(i)) PostMessage(hWndQuery, WM_LBUTTONDOWN, 0, 0) PostMessage(hWndQuery, BM_SETSTATE, MK_LBUTTON, 0) PostMessage(hWndQuery, WM_LBUTTONUP, 0, 0)


Reply With Quote
