"Copy" Lsitbox-Items to another Listbox

  • Thread starter Thread starter Chrisis
  • Start date Start date
C

Chrisis

Guest
At the moment I try to bring the Items from a second Listbox to another Listbox on my primary Form ! I try to do this by creating a property on my main form which i set to me and then work with this property on my secondary form. but i don't get it working !!

Main Form :

Dim XXForm As New frmMain()
Dim XXCount As Integer
Dim XXCurrentItems = lisPersonList.Items.Count() - 1
Dim XXType As System.Type
Dim XXTypeString As String

Me.Close()
XXType = MainForm.GetType()
XXTypeString = XXType.ToString()

MsgBox(XXTypeString)

XXForm.lisPersonList.Items.Clear()
XXForm.Show()

For XXCount = 0 To XXCurrentItems

XXForm.lisPersonList.Items.Add(lisPersonList.Items.Item(XXCount))

Next XXCount

End Sub

Public Property MainForm()
Get

Me.ActiveForm()

End Get
Set(ByVal Value)

End Set
End Property
 
Back
Top