You must assign it to you form instance somewhere
If you create the class after form you can use it's new to set the class
myForm to the Form instance.
Without a larger view of the code I cant tell you more
--
Ceers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
"Simon Morris" <nz*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have try this but myFrmTaskList = Nothing.
Simon
"Crirus" <Cr****@datagroup.ro> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl... In VB.NET a form is a type by itself
You can try this
Dim myfrmTaskList as frmTaskList
When you create the frmTaskList set myfrmTaskList to that instance and
then you can yse it as below
with myFrmTaskList
....
end with
--
Ceers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
"Simon Morris" <nz*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... In VB6 I use to call controls in another form by:
With frmTaskList.lvwTask
Select Case .Visible
Case True
.Items(1).SubItems.Add("dd")
End Select
End With
VB.NET tells me "Reference to non-shared member requires an object
reference".
How do you do it in VB.NET?