Your 'Owner' property is not set to a value. To use this techique, you'd
need to set the Owner property after creating the child form. Can you post
the code that does that?
(btw: Cor's technique is better, IMHO)
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Steve Enzer" <en***@frontiernet.net> wrote in message
news:OZ***************@TK2MSFTNGP09.phx.gbl...
Thanks for your advice, but I'm getting an error with the code you
suggested.
I'm using the statement:
CType(Me.Owner, frmMain).TestBox()
to call the public subroutine TestBox in frmMain. When I test the code I
get an exception with the message:
"An unhandled exception of type 'System.NullReferenceException' occurred
in Project Manager.exe
Additional information: Object reference not set to an instance of an
object."
What do I try next? I'm a VB6 programmer trying to start a new project in
VB .NET 2003 and I'm still on the steep part of the learning curve.