المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Calling functions or checking objects of one form from another (MDI project)



C# Programming
10-27-2009, 02:47 AM
I have a MDI project with a few child forms, and each child form is performing a function, some of which are dependant on nother.
It is a CAN bus reader, so I have a form which sets up and configures the hardware (connected by USB), another one to read the data and put it in a table, another form which can graph some of the data packets in a plot, etc...

My question is in the example above, most of the forms need access to the HW defined in the setup form.
I find myself unable to get data from the table in form 1 to the plot in form 2.

I am new at this, but I got it all working in a single form with tabs, and decided that I would like to have the look and feel of MDI so I can see multiple windowns together, and hit this road block. I thought it would be as simple as calling this for example from FormData --> if(FormSetup.CheckBox == True), but it seems I cannot access an object in another form to check its status or its text, etc...
And the same does not work if I am trying to cal a function.

Is there a place in C# Express I can declare all my valiables and functions so they can be accessed by everyone from the Parent to the Child form? All my objects are set to Internal, and so are my functions. I am just stuck on probably a simple details.
Any help or pointer?

Thanks,
H-