Results 1 to 4 of 4

Thread: error help

  1. #1

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Angry error help

    can someone plz tell me why i get a type mismatch error in this piece of my code..
    VB Code:
    1. Private Sub Command1_Click()
    2. 'Get the room's handle
    3. tWnd = FindWindow(Text2, vbNullString)
    4. 'Get the room textboxe handle
    5. bWnd = FindWindowEx(tWnd, ByVal 0&, "Edit", vbNullString)
    6. SendMessage bWnd, WM_SETTEXT, ByVal "<pbr>P<pbr>a<pbr>l<pbr>t<pbr>a<pbr>l<pbr>k:" & Text1, 0
    7. keybd_event VK_RETURN, 0, 0, 0   ' press enter
    8. keybd_event VK_RETURN, 0, KEYEVENTF_KEYUP, 0   ' release enter
    9. End Sub
    it highlights the last "0" in the SendMessege and also highlights "Private Sub Command1_Click"
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  2. #2
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327

    Re: error help

    Originally posted by ice_531
    can someone plz tell me why i get a type mismatch error in this piece of my code..
    VB Code:
    1. Private Sub Command1_Click()
    2. 'Get the room's handle
    3. tWnd = FindWindow(Text2, vbNullString)
    4. 'Get the room textboxe handle
    5. bWnd = FindWindowEx(tWnd, ByVal 0&, "Edit", vbNullString)
    6. SendMessage bWnd, WM_SETTEXT, ByVal "<pbr>P<pbr>a<pbr>l<pbr>t<pbr>a<pbr>l<pbr>k:" & Text1, 0
    7. keybd_event VK_RETURN, 0, 0, 0   ' press enter
    8. keybd_event VK_RETURN, 0, KEYEVENTF_KEYUP, 0   ' release enter
    9. End Sub
    it highlights the last "0" in the SendMessege and also highlights "Private Sub Command1_Click"

    Sounds to me like a piece of chat spammer code. What chat do you go in?
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    the BYVAL doesn't belong in the SendMessage.....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Well...

    It is for a chat program...allows u to type into the chat from my prog! i wouldnt consider that spam

    but thx for replies newayz.. i think i figured out what the prob was ..hopefully
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

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