S
Steve Howard
[Frustrated beginner alert!!]
I am trying to work out how to subscribe to a form's Close event. When this
form closes, I want my main form (hence my whole application) to close.
This article is supposed to explain, in simple terms, about event
subscription, but somehow I am just not getting it at all -
http://www.codeproject.com/csharp/eventdelegates.asp
My attempts at trying to fudge my own code (before I found the above
article) ended in numerous dead ends where (I think) I needed to get a
reference to a form, because trying to reference a form directly always
failed to compile. It seems that I have not found, or have flat
misunderstood how to successfully glean and hold a reference to a form.
From using other tools I get the principle of, say, a variable that holds
actual data and, say, an Array that might contain references to data, not
the actual data itself. But it seems I am totally missing the point in C#.
Can you point me to an alternative article that might explain event
subscription in another way that might sink into my reluctant brain? And
also something that may help me get hold of a Form reference.
Thanks for your patience!!!
Steve
I am trying to work out how to subscribe to a form's Close event. When this
form closes, I want my main form (hence my whole application) to close.
This article is supposed to explain, in simple terms, about event
subscription, but somehow I am just not getting it at all -
http://www.codeproject.com/csharp/eventdelegates.asp
My attempts at trying to fudge my own code (before I found the above
article) ended in numerous dead ends where (I think) I needed to get a
reference to a form, because trying to reference a form directly always
failed to compile. It seems that I have not found, or have flat
misunderstood how to successfully glean and hold a reference to a form.
From using other tools I get the principle of, say, a variable that holds
actual data and, say, an Array that might contain references to data, not
the actual data itself. But it seems I am totally missing the point in C#.
Can you point me to an alternative article that might explain event
subscription in another way that might sink into my reluctant brain? And
also something that may help me get hold of a Form reference.
Thanks for your patience!!!
Steve