Die Fehlermeldung sagt etwas von fehlender Objektinstanz...
Ich habe mal Dein Projekt mit der VB-Variante der ScrollBar verglichen. Dabei ist mir aufgefallen, dass in Deinem Konstruktor kein Objekt erzeugt wird:
ScrollBar:
Code:
Sub New(ByVal FormName As Control, ByVal Left As Int32, ByVal Top As Int32, ByVal Width As Int32, ByVal Height As Int32, ByVal IsVertical As Boolean)
If IsVertical Then
sb = New VScrollBar
Else
sb = New HScrollBar
End If
sb.Left = Left
sb.Top = Top
sb.Width = Width
sb.Height = Height
FormName.Controls.Add(sb)
Somit müsstest Du Deine Listview um folgendes ergänzen:
Code:
Sub New(ByVal FormName As Control, ByVal Left As Int32, ByVal Top As Int32, ByVal Width As Int32, ByVal Height As Int32)
ListView1 = New ListView
ListView1.Left = Left
ListView1.Top = Top
ListView1.Width = Width
ListView1.Height = Height
FormName.Controls.Add(ListView1)
' Select the item and subitems when selection is made
ListView1.FullRowSelect = True
End Sub
Vielleicht hilft es ja!
Gruß
specci48