Weird Behaviour - Menu Editor
-
:confused: I've got some really weird things happening with menus and the form designer, which I assume are somehow inter-related. I am hoping someone has seen these and figured out what they are; 1) Sometimes, when I drop a ManiMenu from the toolbox into the component tray I get an "Invalid Cast" message box popping up. No other information is available about what the problem is. This problem comes and goes. 2) If I do succeed in getting a ContextMenu or MainMenu into the component tray, selecting it will cause the from to shrink by 20 units. The menu editor simply doesn't work, and attempting to use it only results in the form shrinking. Dropping additional ContextMenus or MainMenus into the component tray does the same thing. 3) If I hand code the ContextMenus & MainMenus into InitializeComponent(), everything works - for a while - then all the code gets deleted. I've resorted to putting it in an InternalInitialize() that I call from the destructors and everything works. I know I'm not supposed to add code to InitializeComponent() - All that is in there is a call to my own routine InteranalInitialize() where I've put my hand coded menus. However, the problem existed before I resorted to hand coding the menus - that was my work around. The end result is I hand code my menus and occasionally have to re-adjust the form height as a result of this shrinkage. The problem remains - I can't edit menus and everytime I try to access a menu the form shrinks. Any ideas anyone? With or without my hand coded menus the problems remain.