﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Maintenance Tool Strip and DevExpress</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 31 May 2026 23:45:34 GMT</lastBuildDate><ttl>20</ttl><item><title>Maintenance Tool Strip and DevExpress</title><link>http://forum.strataframe.net/FindPost20899.aspx</link><description>Ok I will try to give an abbreviated story of where I'm at and what I need.&lt;br&gt;
&lt;br&gt;
For several months now I have been successfully developing using DevExpress suite 8.1 and StrataFrame 1.6.5.  I have recompiled the SF libraries to support a BaseForm_wDXRibbon and StandardForm_wDXRibbon, using instructions posted elsewhere on the forum.  I am able to successfully create forms using SF BOs and DevExpress controls. No problems here.&lt;br&gt;
&lt;br&gt;
Today I tried to create a maintenance form that inherits from the StandardForm_wDXRibbon, now I get the following exception:&lt;br&gt;
&lt;br&gt;
NullReferenceException&lt;br&gt;
  Object reference not set to an instance of an object.&lt;br&gt;
&lt;br&gt;
Source     : MicroFour StrataFrame UI&lt;br&gt;
&lt;br&gt;
Stack Trace: &lt;br&gt;
   at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.HandleEditingStateChanged(EditingStateChangedEventArgs e)&lt;br&gt;
   at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.InitializeObject()&lt;br&gt;
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm_wDXRibbon.InitializeFormLoadObjects()&lt;br&gt;
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm_wDXRibbon.OnLoad(EventArgs e)&lt;br&gt;
   at System.Windows.Forms.Form.OnCreateControl()&lt;br&gt;
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;br&gt;
   at System.Windows.Forms.Control.CreateControl()&lt;br&gt;
   at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.Control.WndProc(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.Form.WndProc(Message&amp; m)&lt;br&gt;
   at DevExpress.XtraEditors.XtraForm.WndProc(Message&amp; msg)&lt;br&gt;
   at DevExpress.XtraBars.Ribbon.RibbonForm.WndProc(Message&amp; msg)&lt;br&gt;
   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp; m)&lt;br&gt;
   at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br&gt;
&lt;br&gt;
If I step through the code the primary BO never has it's parent form loading event called, and I cannot capture this exception it always goes to the main SF unhandled exception function.  If I remove the Maintenance Tool strip everything works fine (except now I need to create all the add, save, and navigate buttons) and the business object populates.&lt;br&gt;
&lt;br&gt;
I'm really at a loss of how to resolve this, I double checked for rogue, outdated libraries, that all the source code between the SF forms and the with DX Ribbon forms are identical (except the class that they inherit from).  I also get the same error if I click on any of the buttons on the tool strip, which leads me to believe the invalid reference is to the primary business object on the form.&lt;br&gt;
&lt;br&gt;
You can repeat this behavior by creating a new standard SF form, then go to the designer code and change the inherits statement to StandardForm_wDXRibbon, then add a maintenance tool strip and any Business Object.  After removing the tool strip the invalid reference exception will go away.&lt;br&gt;
&lt;br&gt;
Thanks a many,&lt;br&gt;
&lt;br&gt;
Jason</description><pubDate>Mon, 01 Dec 2008 09:52:06 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Maintenance Tool Strip and DevExpress</title><link>http://forum.strataframe.net/FindPost20936.aspx</link><description>Jason,&lt;/P&gt;&lt;P&gt;It is really pretty dangerous to do what you have done here for a number of reasons.&amp;nbsp; You are putting yourself out on an island here so you will never be able to reliably load a new SF build without breaking the changes here.&amp;nbsp; I would recommend a totally different approach here.&lt;/P&gt;&lt;P&gt;First of all, you would be better off copying the BaseForm code out of the SF source and creating your own base classes versus changing the SF code itself.&amp;nbsp; This way you can at least have a barometer to work off of when your changes to not work.&amp;nbsp; You can see what is breaking versus everything just not working.&lt;/P&gt;&lt;P&gt;Second, the RibbonForm may be firing things in a different sequence (pretty much guaranteed) than the standard SF dialog which could be having an effect as well.&amp;nbsp; So without me setting this up, I am not going to be able to tell you exactly what needs to happen in regards to the changes.&lt;/P&gt;&lt;P&gt;Third, and this is just a warning, I have experienced a number of reports from other SF users that the ribbon form (along with the DevExpress themes) has caused some performance issues the larger the application has become.&amp;nbsp; This has nothing to do with your issue, but I thought it prudent to at least point this out.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Again, without me actually trying to set this up I will not be able to tell you exactly where your issue is.&amp;nbsp; However, I am farily confident that the instantiation of the ribbon form will be firing differently than the standard .NET dialogs which to me would be the first place I would start looking.</description><pubDate>Mon, 01 Dec 2008 09:52:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Maintenance Tool Strip and DevExpress</title><link>http://forum.strataframe.net/FindPost20902.aspx</link><description>Oops, forgot my attachment here it is.&lt;br&gt;
&lt;br&gt;
:P</description><pubDate>Tue, 25 Nov 2008 14:25:53 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Maintenance Tool Strip and DevExpress</title><link>http://forum.strataframe.net/FindPost20901.aspx</link><description>I have included difference reports of what I modified in the SF library.  I pretty much created copies of the BaseForm and the StandardForm classes.  Appended '_wDXRibbon' to the class names.  Then modified the BaseForm (both main and designer file) to inherit from DevExpress.XtraBars.Ribbon.RibbonForm.  Then I changed the StandardForm (both main and designer file) to inherit from BaseForm_wDXRibbon.  Otherwise I have not made any other significant changes to the library.&lt;br&gt;
&lt;br&gt;
As for code samples I'm not really sure what you would be looking for.  At this point the only code I have written is a call to the BO Fill method in the ParentFormLoading event, otherwise it's just add a new form, inherit from StandardForm_wDXRibbon, add a BO and add a maintenance tool strip.  After I remove the tool strip everything works fine. &lt;br&gt;
&lt;br&gt;
Would you need me to perhaps modify one of the sample SF projects and include a copy of my library source code???</description><pubDate>Tue, 25 Nov 2008 14:24:18 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Maintenance Tool Strip and DevExpress</title><link>http://forum.strataframe.net/FindPost20900.aspx</link><description>Well, there could be a couple of things going on here.&amp;nbsp; First of all, I don't know what your base form code looks like.&amp;nbsp; Second, all of the logic that the MaintenanceFormToolstrip interacts with expects the BaseForm to be part of the inheritance string as it calls methods on the base form.&amp;nbsp; So without seeing an example or sample of this, it is going to be hard for me to give you step-by-step instructions to resolve this.&amp;nbsp; If you could post a sample that would make it the easiest to help you diagnose your problem.</description><pubDate>Tue, 25 Nov 2008 12:37:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>