Hi,
I must program a Form that contains OCXs in a TabControl, each tab of which
contains a single OCX. I
created that with the Designer and it works ok.
For different reasons, I decide to create a UserControl that only contains
the TabControl that contains the OCXs, 1 OCX per tab. The UserControl will
go to my original Form.
Unfortunately the second design doesn't work well. The first tab shows its
OCX all right. But in all
subsequent tabs, the OCX doesn't appear at all. If I swap tabs, without
changing their content, the OCX in the first tab always appear whereas the
OCXs of the subsequent tabs never do.
In the hope of finding a clue I used reflexion to enumerate all the
properties of the OCXs. The only meaningful difference (except from name or
size) is that the CanFocus property of not-appearing OCXs is false whereas
it's true for the appearing OCX. All others properties are the same,
including Visible and Enabled that are both true.
If an OCX is inserted on the UserControl but next to the TabControl, it
appears.
If the tabs contain other controls, they appear too.
In one word I can't understand what happens. Do you have an idea ?
Thanks,
Manu