Results 1 to 5 of 5

Thread: [solved] Add Item to ListBox on Another Application...

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    [solved] Add Item to ListBox on Another Application...

    Hi,

    How do I use the SendMessage API to add a string to a listbox on another application?

    I have searched the forums and got nothing.

    (i hope at least) this is possible?

    Tnx.
    Last edited by wpearsall; Oct 9th, 2003 at 10:41 AM.
    Wayne

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Const LB_ADDSTRING = &H180
    2.  
    3. Private Sub Command1_Click()
    4.  
    5.     Call SendMessage(SomehWnd, LB_ADDSTRING, (-1), "Test")
    6.  
    7. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    Is there any special way i need to format the text before i send it?

    because it isnt adding to the list as i send it


    This:
    ---------------------------
    This is my text to add to the list
    ---------------------------

    Becomes:
    ---------------------------
    ÔÊ
    ---------------------------

    Thanks
    Wayne

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Try putting ByVal in front of the string, maybe.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    thanks, thats got it
    Wayne

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