VB6 OCX in C# - Mdichild form issues
I have a graph component (ocx) written in VB6, on the graph there is a toolbar.
I have added the graph to a C#.net application. The graph works fine with normal windows, however when its placed on a mdichild form all of the graph (ocx) toolbar buttons disappear, the toolbar appears as a blank rectangle.
I know this is a bit of a weird one, but has anyone got any ideas?
Thanks
Re: VB6 OCX in C# - Mdichild form issues
Do you have a ToolStrip in the parent window?
Re: VB6 OCX in C# - Mdichild form issues
Yes, the MDIParent has a toolstrip.
Re: VB6 OCX in C# - Mdichild form issues
It will be the tool bars trying to merge then I'd guess. Look at the your parent form's ToolStrip properties, and maybe the items too, relating to merging. The ToolStrip.AllowMerge property would be the place to start, although I thought that it was False by default. Maybe your child window is trying anyway and is messing things up. Interoperability between .NET and VB6 is not 100%.
Re: VB6 OCX in C# - Mdichild form issues
Thanks for the info - However I've tried changing the allowmergre to false and I also tried removing the MDIParent Toolbar altogether, but I've still got the same problem.
The only solution I can come up with is to replace the toolbar will a load of buttons in a frame. Seems a bit naff though.
Re: VB6 OCX in C# - Mdichild form issues
That's Interop for you. It has limitations and it appears as though this might be one of them.