Results 1 to 3 of 3

Thread: It's just like a copy machine! Only Different

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305
    I have two listviews on two different forms of the same program, and I want them to contain the same data. How do I get the data from frmMain.ListView1 to frmEdit.ListView1?

    bob

  2. #2
    Lively Member nutstretch's Avatar
    Join Date
    May 2000
    Location
    UK
    Posts
    85
    do you see the forms both at the same time or do you show one and unload or hide the other
    if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305
    Never mind. I got it. And both are visible, though it doesn't matter. Here's what I did:

    Code:
    For X = 1 To Players(0).ListItems.Count
    Set Plad = frmMakeTeam.PlayersEdit.ListItems.Add(X, , Players(0).ListItems(X).Text)
    Plad.SubItems(1) = Players(0).ListItems(X).SubItems(1)
    Plad.SubItems(2) = Players(0).ListItems(X).SubItems(2)
    Next X
    where Players(0) is the original listview, frmMakeTeam is the second form, and PlayersEdit is the copied listview. I had the code on form_load of the copied form, adjusted a little, but it didn't work, so I tried putting it in the main original, and it did work.

    Thanks though.

    bob

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