StrataFrame Forum

Disappearing Toolstip

http://forum.strataframe.net/Topic16404.aspx

By Keith Chisarik - 5/16/2008

I have a base maintenance form that has a only a single GradientFormHeader and ToolStripContainer controls. Very sporadically the MaintenanceFormToolStrip disappears at runtime from my forms, and when I check the line below has been deleted from the designer file and I have to add it, then it is OK for a while. Any ideas?

Me.ToolStripContainer1.TopToolStripPanel.Controls.Add(Me.MaintenanceFormToolStrip1)

So it looks like this:

MYBASE - Inherits MicroFour.StrataFrame.UI.Windows.Forms.StandardForm

MYMAINTBASE - Inherits MMYBASE

frmSomething - Inherits MYMAINTBASE (funky behavior described above)

By Trent L. Taylor - 5/16/2008

So the MaintenanceFormToolstrip is on your base form and then it disappears from the inherited form?  This is funky if this is the case!  Actually, even if it is being removed from the base form, this is still strange behavior.  I have seen .NET do some things like this when the InitializeComponent() method is either a.) not called from a New b.) additional logic is be added to a load event of some type (i.e. Load, OnCreateControl, etc) and the Me.DesignMode is not being taken into account (in this case something that should only be done at run-time). 

I have seen these types of things interfere, so that is where I would start to look...otherwise, well, more digging will be involved Smile

By Keith Chisarik - 5/16/2008

It is being removed from the inherited form.
By Trent L. Taylor - 5/16/2008

That is really strange.  The designer file of the child should not actually show the MaintenanceFormToolstrip...does it end up in there?
By Keith Chisarik - 5/16/2008

The MaintenanceFormToolstrip is not on my base, it is on the child form and is periodically removed from the designer and I have to readd it, it just happened, I ran the form about 25 times and it was fine, the 26th it was gone from the designer file and had to be re-added. I hadnt touched the form between runs, I was just doing testing with data.
By Trent L. Taylor - 5/16/2008

This is one of those things that I cannot give a straight answer on.  This is not going to be SF related but .NET and designer serialization related....without actually reproducing this I really don't know what to tell in order to work through the issue.  I have seen some of these serialization issues in the past, but they have generally all been environment related...and they are all different Ermm
By Keith Chisarik - 5/16/2008

Fair enough.