Results 1 to 3 of 3

Thread: SendMessageByString and Enter

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2000
    Posts
    215
    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.

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    59

    Cool

    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]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2000
    Posts
    215
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width