in VB.NET I'm trying to access my variable without resorting to SHARED
scope.
Here's the situation: class MYLABEL inherits LABEL and has an additional
property called MYVAR. In MYLABEL I set an ADDHANDLER for ME.MOUSEDOWN event
to ME.MYHANDLER. PRIVATE SUB MYHANDLER (part of the MYLABEL class)
creates
a new context menu at runtime and does an ADDHANDLER for the context menu
item CLICK event to MYSUB. PUBLIC SUB MYSUB then creates an instance of a
new form (MYFORM) and does a MYFORM.SHOWDIALOG. In the MYFORM class I have
a button and in that buttons click event I need to access the variable MYVAR
(which is a property in the MYLABEL class).
Now, I know this description sounds complicated but it's not really. Here's
what happens. The user right clicks on a label and a context menu appears.
User clicks on a context menu choice which causes a new form (MYFORM) to
appear. Within the MYFORM the user enters data into a textbox, hits SAVE
button and that info needs to be transfered into the MYVAR variable (which
is
a property of MYLABEL).
My problem is that I can't get to the MYVAR variable. If it were two forms
I'd just pass a formname as a parameter to a procedure call , but because
there's a mousedown event in the middle (which has a specific signature for
parameters), I'm at a loss as to how to do this. Any help greatly
appreciated.