1
Reply

PLEASE HELP ME! Form single instance???

Boblysan

Boblysan

Jan 22 2005 1:33 PM
2.1k
Ok,, I have 2 forms (formClassA and formClassB) When my main form (formClassA) loads, I want to have "THIS" instance of the form be used / called upon for the rest of my application. Such that.. . From formClassB I would like to be able to call on a public method in formClassA at any given time without starting a NEW instance of formClassA. I believe that is what is happening now because when I call on one of these methods I am getting a null reference for formClassA. in formClassA I have a method like.. public DoSomething() { code } In formClassB within the formClassB class declaration I have placed the following code. fca = formClassA In formClassB I am putting the following code.. fca.DoSomething(...) .............. I know this is probably not the correct way or I have something missing.. Any assistance woudl be GREATLY appreciated. Thanks, Bob

Answers (1)