PDA

Click to See Complete Forum and Search --> : SendMessageByString and Enter


Crypt
Aug 23rd, 2000, 12:11 AM
Hiyas,

I was just wondering if anyone knew how to send enter at the end of a string with the sendmessagebystring api? I have tried vbCrLf , and Chr(13) & Chr(10) , I've tried sending Chr(13) by itself but nothing seems to work, any ideas anyone?

thanx for any help.

Archon
Aug 23rd, 2000, 01:24 AM
put this on a Module:
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_CHAR=&H102


Private Sub Command1_Click()
Dim strMessage as long
strMessage=SendMessage(Me.hWnd,WM_CHAR,vbKeyReturn,0)
End Sub

If it does not work then i did not understood your question Clearly.



[Edited by Archon on 08-23-2000 at 02:28 AM]

Crypt
Aug 23rd, 2000, 01:55 AM
thanx for replying, yep that was what I was after but it sends the enter to the begging of the text box I am trying to send it to, I am using the sendmessagebystring to send the text string, so I just tried to use that after I send the string and it pushe's myline and every other line down one, is there anyway to send the enter to the end of the textbox?

thanx again for your help.