Results 1 to 9 of 9

Thread: simple listbox question

  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

    simple listbox question

    Can someone plz post code to remove the selected item in a listbox
    And does anyone know of any Listbox tutorials, i havent used them much

    Thankz in Advance
    :::`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
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    dim i as integer

    for i = list1.listcount-1 to 0 step -1
    if list1.selected(i) = true then list1.removeitem i
    next
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3
    Hyperactive Member
    Join Date
    May 2003
    Posts
    401
    Try this:

    List1.RemoveItem List1.ListIndex

    Enjoy!!!
    apps_tech

  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
    Ty for your help

    One more thing:
    i've got a textbox on my form and i need once u click a button, that it search for the text thats in the textbox in a systreeview32 on a chat window.. to find that username..
    can anyone help?
    (chat window is on an external program)
    example would be nice

    thx once again in advance.
    :P
    :::`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++

  5. #5
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    You need to use API to get the contents of that list box..

    Then you could just use a For Next loop to run though the list box.

  6. #6
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Originally posted by ice_531
    Ty for your help

    One more thing:
    i've got a textbox on my form and i need once u click a button, that it search for the text thats in the textbox in a systreeview32 on a chat window.. to find that username..
    can anyone help?
    (chat window is on an external program)
    example would be nice

    thx once again in advance.
    :P
    Not a chance
    What you are asking for there is VERY, VERY complicated!!!
    I know how to get the hWnd for the form that the treeview resides in, but getting the treeview's hWnd is a completely different story

    No being funny, or having a go, but if you have to ask how to remove an item from a listbox then you will not be able to deal with the code that will highlight an item in a treeview in another application, it's VERY messy API

    Anyways, if you still want to persist with the treeview thing, then your best bet is to private message Merrion...they are very handy with API

    Woka

  7. #7

    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
    K. thx
    :::`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++

  8. #8

    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..

    Anyone have any treeview api tutorials or such?

    not seen ne const. for it in api viewer n ****

    so i dunno how to query it
    :::`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++

  9. #9

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