M
Max
Last time I tried to explain this on another forum it didn't go too
well, so I'll try my best and if you know what I'm talking about then
please tell me how to do this.
I have a class, inside I have some public functions and private
variables. Inside the class I also have a declaration of a new form
object. One of the functions of the class takes that form object, shows
it with showdialog and the basically passes the control to the form and
the user. Now then, while the form is opened it needs to be able to call
a function from the class that created the form. Not just a function
from the same object type, but it has to be a function from the same
instance.
So basically I need to somehow have an object inside the form that is of
the same type as the initial class and points to the same instance. In
my C++ days this would've been a breeze, but with VB I can’t figure out
how to do this. I tried creating a public function that took one
argument, something like "ByRef master as <objecttype>". Then inside the
form class I'd have a private variable also of that type and would say
mymaster = master in that function hoping that no mymaster would be set
to the instance of master. But when I tried to use mymaster I got an
error that this class does not have an instance. Any ideas (or anyone
even understand what I'm saying lol)?
well, so I'll try my best and if you know what I'm talking about then
please tell me how to do this.
I have a class, inside I have some public functions and private
variables. Inside the class I also have a declaration of a new form
object. One of the functions of the class takes that form object, shows
it with showdialog and the basically passes the control to the form and
the user. Now then, while the form is opened it needs to be able to call
a function from the class that created the form. Not just a function
from the same object type, but it has to be a function from the same
instance.
So basically I need to somehow have an object inside the form that is of
the same type as the initial class and points to the same instance. In
my C++ days this would've been a breeze, but with VB I can’t figure out
how to do this. I tried creating a public function that took one
argument, something like "ByRef master as <objecttype>". Then inside the
form class I'd have a private variable also of that type and would say
mymaster = master in that function hoping that no mymaster would be set
to the instance of master. But when I tried to use mymaster I got an
error that this class does not have an instance. Any ideas (or anyone
even understand what I'm saying lol)?