We have a MDI main form, which contains a main menu and holds the properties and routines to
- select, read and write a selected DAT-input file, and to convert the data to and from a MS-Access database
- open forms like grids and specificly an InpMatrix (which shows INPUTMATH data).
This InpMatrix is a form with a TableLayoutPanel (TLP) which contains a matrix of usercontrols and holds the
properties and routines to
- read and write data the MS-Access database from and to a (temporary) dataset.
- Draw a matrix with usercontrols, and fill it with data from the dataset
- select, read and write data and properties in the usercontrols
There are 3 usercontrols:
- ucStream which holds the properties and routines of the Stream class
They are presented as the "labels" in the top of the TLP (x-direction)
- ucComponent which holds the properties and routines of the Component class
They are presented as the "labels" on the left of the TLP (y-direction)
- ucCell which holds the properties and routines of the Cell class
Some Routines of the usercontrol are Public, so they are accessible from the InpMatrix form.
In this way a form subroutine can handle multple usercontrols simultaniously.
Some routines of the InpMartix are also Public, so they can be accessed from the main form.
I also need to access the InpMatrix routines from a usercontrol, so clicking on a ucStream will not only
select the cell itself, but will select all the cells in the column.
--> Making the InpMatrix routines Public turns out to be INsufficient to access these routines from a usercontrol.
So to be able to access these routines I tried making them Public shared. No luck: the Public shared functions
are even unaccessible from the main and the InpMatrix itself. I am probably overlooking something obvious...