﻿<?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?)  » Browse Dialog issue</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:04:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18418.aspx</link><description>I don't know when or how it happened, but for&amp;nbsp;whatever reason&amp;nbsp;a few&amp;nbsp;of my browse dialogs are crashing with the error below. I have not made any changes to any individual browse dialogs in a very very long time. I know that these browse dialogs&amp;nbsp;worked&amp;nbsp;fine on my last release as it is&amp;nbsp;currently&amp;nbsp;in&amp;nbsp;production&amp;nbsp;and&amp;nbsp;I can't think of anything that I&amp;nbsp;changed since then that might cause this problem.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any ideas on&amp;nbsp;what to look at on this&amp;nbsp;&lt;/P&gt;&lt;P&gt;[codesnippet]ArgumentOutOfRangeException&lt;BR&gt;&amp;nbsp; Index was out of range. Must be non-negative and less than the size of the collection.&lt;BR&gt;Parameter name: index&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : mscorlib&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.ThrowHelper.ThrowArgumentOutOfRangeException()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Collections.Generic.List`1.get_Item(Int32 index)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog&amp;#119;indow.PositionLabels(Control&amp;amp; ParentControl)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog&amp;#119;indow.AddSearchFields()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog&amp;#119;indow..ctor(BrowseDialog browse, Boolean PopulateOnShow)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog(Boolean PopulateOnShow, IWin32Window ResultsWindowOwner)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog(Boolean PopulateOnShow)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at ActionLabor.Payroll.UI.WindowsForms.Frmmain.BtnBrowse_ItemClick(Object sender, ItemClickEventArgs e) in C:\Action Labor Payroll\UI\Forms\FrmMain.vb:line 545&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarItemLink.OnLinkClick()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message&amp;amp; msg)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;[/codesnippet]&amp;nbsp;</description><pubDate>Wed, 13 Aug 2008 09:26:26 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18466.aspx</link><description>Took you long enough!!!! Jeez almost an hour .. J/K&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thanks alot Trent as usual you&amp;nbsp;are on top of it:)</description><pubDate>Wed, 13 Aug 2008 09:26:26 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18458.aspx</link><description>Done.&amp;nbsp; I added a test on the PositionLabels and PositionControls to prevent the error if there are no search fields visible within the dialog.&amp;nbsp; It will be in the next build posted.</description><pubDate>Wed, 13 Aug 2008 09:04:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18452.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;The line where it is failing is.&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; lnTextHeight &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Integer&lt;/FONT&gt;&lt;FONT size=2&gt; = _Controls.Item(0).Height&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;What happened was there were no search fields visible in the key&amp;nbsp;so the add labels was crashing due because the controls collection was empty.&amp;nbsp;I dont know why they were not visible i guess i must have been screwing around with them. &lt;/P&gt;&lt;P&gt;could you&amp;nbsp;test for this condition (no search fields visible)&amp;nbsp;and allow a browse dialog&amp;nbsp;to come up without visible search fields&amp;nbsp;and&amp;nbsp;allow the&amp;nbsp;user&amp;nbsp;to then add search fields?&amp;nbsp;It sure beats crashing :)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks alot Paul</description><pubDate>Wed, 13 Aug 2008 08:18:47 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18429.aspx</link><description>[quote]&lt;P&gt;I will spend some time poking around and start from the bottom and work my way up till&amp;nbsp;I find the problem&amp;nbsp;i was just hoping you would say oh yeah we know what that is just set the don't crash property to true and you'll be fine. &lt;/P&gt;&lt;P&gt;[/quote]&lt;/P&gt;&lt;P&gt;That would have been nice, huh :D&amp;nbsp; We actually have a lot of BD's in our medical software as well that use the very same approach that you are in regards to a Browse Base and then inherit from that base BD.&amp;nbsp; And we have not noticed any issues....so you might just want to build the source in debug mode.&lt;/P&gt;&lt;P&gt;I have just posted a new build in the last minute or so as well as the source code for that build in the My Account area.&amp;nbsp; So you may want to build the source in debug mode so that you can see where it is breaking.&amp;nbsp;</description><pubDate>Tue, 12 Aug 2008 09:53:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18423.aspx</link><description>Hiya Trent,&lt;/P&gt;&lt;P&gt;I'm using inherited standard SF browse dialogs. For instance&amp;nbsp;I have customerbrowse which in inherits from browse base and EmployeeBrowse which also inherits from browse base. Customer browse works fine but employee bombs, I have several BD's that work and several that do not although all of them did work last release and I haven't changed the browse dialog or the base class in quite awile but&amp;nbsp;I may have changed something else that is making&amp;nbsp;them spit up I am just not sure what on earth it may be that&amp;nbsp;I changed that would cause this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will spend some time poking around and start from the bottom and work my way up till&amp;nbsp;I find the problem&amp;nbsp;i was just hoping you would say oh yeah we know what that is just set the don't crash property to true and you'll be fine.</description><pubDate>Tue, 12 Aug 2008 09:33:34 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog issue</title><link>http://forum.strataframe.net/FindPost18419.aspx</link><description>A couple of things here.&amp;nbsp; First, are you using the standard StrataFrame BrowseDialogs or the DevExpress Wrapper?&amp;nbsp; Secondly, I was looking and this method hasn't been changed in a very long time...so...we may need to start looking at your environment.&amp;nbsp; Also, one thing you might try, just for grins, is to create a temp form and drop on a BrowseDialog and see if the error persists on a new browse...the only reason for this is to see if the error pops up immediately here which will give us more to go on when working through your problem.</description><pubDate>Tue, 12 Aug 2008 09:10:20 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>