Results 1 to 5 of 5

Thread: The Final Part in my ListVeiw Saga....

  1. #1

    Thread Starter
    Hyperactive Member Azz00's Avatar
    Join Date
    Sep 2001
    Location
    Scotland
    Posts
    457

    The Final Part in my ListVeiw Saga....

    Right ive got my server names and the IP
    in colloms 1 and 2
    But now for the Third Collum
    *Spooky Music Please*

    *Drumroll*
    my Last Collum Shall Contain a Ping!
    but I dont want help on writing it in the Listveiw I must learn myself

    so i will figure the writing in to last collum my self
    but I dont know how to Ping a IP
    without a Client server App
    evan then id need a help
    but how can i ping the IP addresses in my ListVeiw ?
    www.azzmedia.co.uk

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member Azz00's Avatar
    Join Date
    Sep 2001
    Location
    Scotland
    Posts
    457
    Dammned!
    ok problemo

    First

    In my Add server thing it dosent only add it to the files but the listbox too like so
    VB Code:
    1. Private Sub Command1_Click()
    2. Call SaveToFile
    3. Call SaveIP
    4. tempAdd = frmMain.lstServer.ListItems.Count
    5. With frmMain.lstServer
    6.     .ListItems.Add tempAdd, , txtName
    7.     .ListItems(1).ListSubItems.Add tempAdd, , txtIP
    8. End With
    9.     Unload Me
    10. End Sub

    And the problem is say my listbox already has some things in it
    but it adds the name Fine but then it adds the IP in the Third Collum in my first entry in listveiw insteasd of the second collum of my item i just added ?


    Also i want to get the selected Items Second Collum Property
    and it dont do this

    VB Code:
    1. Dim IP as String
    2. IP = lstserver.selecteditem 'THIS BIT ?
    3. End Sub
    www.azzmedia.co.uk

  4. #4

    Thread Starter
    Hyperactive Member Azz00's Avatar
    Join Date
    Sep 2001
    Location
    Scotland
    Posts
    457
    Anyone Got any ideas ?
    www.azzmedia.co.uk

  5. #5
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    I read your description of your problem three times and I'm still a little fuzzy on what you're talking about. But try this...

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim ItemX As ListItem
    3. Call SaveToFile
    4. Call SaveIP
    5. tempAdd = frmMain.lstServer.ListItems.Count
    6. Set ItemX = frmMain.lstServer.ListItems.Add(tempAdd, , txtName)
    7. ItemX.SubItems(1) = txtIP
    8. Unload Me
    9. End Sub

    and

    VB Code:
    1. Dim IP as String
    2. Dim ItemX As ListItem
    3. If Not lstserver.selecteditem Is Nothing Then
    4.     Set ItemX = lstserver.selecteditem
    5.     IP = ItemX.SubItems(1) 'THIS BIT ?
    6. End If

    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

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