﻿<?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?)  » Run time error on DevEx Subclasses TextBox</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 04 Jul 2026 08:43:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Run time error on DevEx Subclasses TextBox</title><link>http://forum.strataframe.net/FindPost30446.aspx</link><description>I just upgraded the DevEx Comntrols to 11.1 and since then I am getting a run time error on a Devex Subclassed Control&lt;br/&gt;&lt;br/&gt;(Everything was working fine prior to the upgrade)&lt;br/&gt;&lt;br/&gt;I have traced the Error (Object reference not set to an instance....) &amp;nbsp;back to a Line on the .Designer.cs file :&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;((System.ComponentModel.&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;ISupportInitialize&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;)(&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;this&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;.txtTotalExposure.Properties)).BeginInit();&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;My Subclassed Code is (Which I have not changed)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;[quote]// 31-03-11 Subclass form DevExpress Controls&lt;br/&gt;public class dxTextEdit : MicroFour.StrataFrame.UI.Windows.Forms.DevEx.TextEdit&lt;br/&gt;{&lt;br/&gt;private System.Drawing.Color originalBackgroudColour;&lt;br/&gt;protected override void OnEnter(EventArgs e)&lt;br/&gt;{&lt;br/&gt;//-- Run Base Class Code&lt;br/&gt;// XtraMessageBox.Show("this is a message in OnEnter of dcTextEdit");&lt;br/&gt;base.OnEnter(e);&lt;br/&gt;//-- Save away original background color&lt;br/&gt;this.originalBackgroudColour = this.BackColor;&lt;br/&gt;// Mimic the VFP SelectOnEntry = .t.&lt;br/&gt;this.SelectAll();&lt;br/&gt;　&lt;br/&gt;//-- Set fields to be the maximum length of the database fields&lt;br/&gt;//-- For Memo (VarChar(Max) check for Mutiline..assumes Multiline is on for VarChar(Max) though&lt;br/&gt;// -----&amp;gt; TextEdit does not seem to have a propety called MultiLine or AutoAdjustMaxLength..GOC Modified SF code No MUltiLine though ??&lt;br/&gt;if (this.BusinessObject == null )&lt;br/&gt;{&lt;br/&gt;this.AutoAdjustMaxLength = false;&lt;br/&gt;}&lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;// XtraMessageBox.Show("dxTextEdit... before setting this.AutoAdjustMaxLength to true");&lt;br/&gt;this.AutoAdjustMaxLength = true;&lt;br/&gt;}&lt;br/&gt;　&lt;br/&gt;//-- Define the background color for the control.. maybe extend this to use a property later&lt;br/&gt;this.BackColor = Color.Aqua;&lt;br/&gt;}&lt;br/&gt;　&lt;br/&gt;protected override void OnLeave(EventArgs e)&lt;br/&gt;{&lt;br/&gt;//-- Run the Base Code for the textbox&lt;br/&gt;base.OnLeave(e);&lt;br/&gt;//-- Reset back color to the default&lt;br/&gt;this.BackColor = this.originalBackgroudColour;&lt;br/&gt;}&lt;br/&gt;} // End dxTextEdit&lt;br/&gt;　&lt;br/&gt;// 31-03-11 SubClas dxTextEdit for 0 decimal point numeric field&lt;br/&gt;public class dxTextEdit0D : dxTextEdit&lt;br/&gt;{&lt;br/&gt;protected override void OnEnter(EventArgs e)&lt;br/&gt;{&lt;br/&gt;base.OnEnter(e);&lt;br/&gt;this.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;&lt;br/&gt;this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;&lt;br/&gt;this.Properties.EditFormat.FormatString = "###,###,###,##0"; // Allow dec point else it ignores it and 12.34 goes to 1234&lt;br/&gt;this.Properties.DisplayFormat.FormatString = "###,###,###,##0";&lt;br/&gt;this.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;&lt;br/&gt;this.Properties.Mask.EditMask = "n00";&lt;br/&gt;}&lt;br/&gt;} // End dxTextEditN0[/quote]&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Fri, 28 Oct 2011 05:01:09 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Run time error on DevEx Subclasses TextBox</title><link>http://forum.strataframe.net/FindPost30504.aspx</link><description>Hi Zoltan.&lt;br/&gt;&lt;br/&gt;Are you getting a run time error in relation to new version of Dev Express with Modifified SF Source Code ? . If so, what fixed it for me, was recompiling the SF Source Code (for DevExpress Wrappers) and&lt;font color=#ff0000&gt; SPECIFICALLY COPYING THE SF DevExpress .DLL to the GAC&amp;nbsp;&lt;/font&gt;&lt;font color=#000000&gt; (By first deleting the Exisitng GAC DLL, then opening two concurrent versions of Windows Explorer and Dragging and Dropping the DLL from the compiled folder into the GAC folder)&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#ff0000&gt;&lt;/font&gt;&amp;nbsp;</description><pubDate>Fri, 28 Oct 2011 05:01:09 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Run time error on DevEx Subclasses TextBox</title><link>http://forum.strataframe.net/FindPost30503.aspx</link><description>&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl03_lblFullMessage"&gt; I checked while updating SF source and closed all the projects that used the libraries.But still it shows an error message while updating SF source...Can anyone point out where am I going wrong.&lt;/span&gt;									</description><pubDate>Fri, 28 Oct 2011 01:23:29 GMT</pubDate><dc:creator>Zoltan Riss</dc:creator></item><item><title>RE: Run time error on DevEx Subclasses TextBox</title><link>http://forum.strataframe.net/FindPost30448.aspx</link><description>Hi Gerard,&lt;br/&gt;&lt;br/&gt;Yeap, I've seen errors like that before when rebuilding SF source.&amp;nbsp; Make sure when you are updating the SF source that any project that uses those libraries are closed.</description><pubDate>Thu, 20 Oct 2011 08:19:15 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Run time error on DevEx Subclasses TextBox</title><link>http://forum.strataframe.net/FindPost30447.aspx</link><description>OK . Seem to have got this sorted.&lt;br/&gt;&lt;br/&gt;Even though I 'thought' I had copied the Recompiled SF Inherited UI.dll to the GAC, it does not look as if it had been copied. So I &lt;font color=#ff0000&gt;removed &lt;/font&gt;the existing one, and recopied if to the GAC from the Project Folder. Error is gone away now !!</description><pubDate>Thu, 20 Oct 2011 05:08:07 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item></channel></rss>