XBox.ShowModal problem

I have a couple of forms I wish to use as dialog boxes, say form
Adlg and Bdlg in units A and B. Unit C is the main item and
has A and B in its uses clause. I want to have the lines:


and also


in some part of C's code, but when doing so, the compiler spits
out "Invalid Variable Reference" for the ShowModal lines, but allows
me to to A.Show or B.Show.

Comparing this to about 5 other projects I have, I cannot see
anything different to the properties on the Adlg and Bdlg forms.

Can anyone shed any light on what I may be missing?

Cheers and thanks in advance,

Mark Eve (