Results 1 to 18 of 18

Thread: saving listbox content of another program

  1. #1
    chenko
    Guest

    saving listbox content of another program

    is possible to get the contents of another programs listbox?

    cheers
    .

  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    *I saw you in that fish costume - very fetching*

    http://forums.vb-world.net/showthrea...rispin+listbox
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3
    chenko
    Guest
    cheers, rather nice aint it, im wanting to swap it for a trout suit now


    ok thanks for the code... the thing is i dont know what the listbox name is in that program?

  4. #4
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Youre gonna have to do a findwindowEx, until you find the right window, one way to test to se if you have the right window, is to use GetClassName, and if it returns a ListBox class, then try and grab the contents of the listbox.....but if there are many listboxes you might get a bit stuck.....

    if you need code lemme know i'll do something tonight....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  5. #5
    chenko
    Guest


    To help better, its the references window in VB... I want to output the contents to another list box, and then install a program... then look for new values.


    cheers

  6. #6
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    you can get these from the vbp file itself, drag it to notepad and check it out....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  7. #7
    chenko
    Guest
    that would mean i have to add them all first.... ummm, i will give it a try....

  8. #8
    chenko
    Guest
    ...I just tried... and I dont think its an option :/

  9. #9
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    OK,

    what im gonna do is do a findwindowex for the references dialog - then i'm gonna get the window text, and if it's the references dialog box, then i'm gonna extract the contents of the listbox. give me a short while and i'll post the code...
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  10. #10
    chenko
    Guest
    ok thanks, cheery muchy

  11. #11
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Heres your code woolmaster swift!

    if you need anything else lemme know.....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  12. #12
    chenko
    Guest
    cheers old bean


    but (there had to be one ) where does it go?? stupid old me cant find it

  13. #13
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    heres a different version with a returned collection, check that the collection is not nothing on return, if it's not then you have your list....
    Attached Files Attached Files
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  14. #14
    chenko
    Guest
    eh?

    I have troubles understanding other peoples code... also, looking at it... does it only return the list items that have the tick box besides them ticked, as i would like all of them


    cheers again

  15. #15
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    just whip out the code that tests for selection, I put that in especially you ungrateful (*&*&^*&%!!!!!

    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  16. #16
    chenko
    Guest
    no no, im way grateful

    I put in a function making it always return true... but it goes mental with errors etc... the main problem is where does the list go? to an array?


    thanks

  17. #17
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    baaaaaaaaaaa!

    they get returned into a collection....

    just put this code under a button or whereever really...
    Code:
    Dim ccol As New Collection
    Set ccol = GetListBox
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  18. #18
    chenko
    Guest
    baaaaaaaaaaaaaaaaa!!

    now your talking my language

    Well i had a play for a while, and a few amendments and I got it sorted finally

    thanks muchy mukka

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