Controls.Clear() CF 2.0

  • Thread starter Thread starter MDB
  • Start date Start date
M

MDB

Hello all, I am currently converting my application to CF 2.0 and ran into a
problem with the TabControl.Controls.Clear() call. When the form and tab
page is first loaded it works fine but doesn't work if it is called a second
time? This works find in CF 1.1? To give you an idea, I have a tab page
that has language specific information in it, if the user selects a new
language from a drop down box (an NO it is not within the tab control), I
call the TabControl.Controls.Clear() call and then reload it. Also there is
no error message? Here is what the stack trace looks like:


at Microsoft.AGL.Common.MISC.HandleAr()\r\n
at System.Windows.Forms.Control.ResumeLayout()\r\n
at System.Windows.Forms.Control.ResumeLayout()\r\n
at ControlCollection.Clear()\r\n
at myApp.frmDisclaimer.LoadDisclaimers()\r\n
at myApp.frmDisclaimer.cbLanguage_SelectedIndexChanged()\r\n
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged()\r\n
at System.Windows.Forms.ComboBox.WnProc()\r\n
at System.Windows.Forms.Control._InternalWnProc()\r\n
at OpenNETCF.Windows.Forms.ApplicationEx.DispatchMessage()\r\n
at OpenNETCF.Windows.Forms.ApplicationEx.Pump()\r\n
at OpenNETCF.Windows.Forms.ApplicationEx.RunMessageLoop()\r\n
at OpenNETCF.Windows.Forms.ApplicationEx.Run()\r\n
at myApp.Classes.StartUp.Main()
HResult -2146232798 int


Any Ideas?

TIA
 
I just tried that and had the same results, below is everything in the
exception:

_HResult -2146232798 int
_innerException null System.Exception
_message "" string
+ _methodDescs {Dimensions:[13]} System.IntPtr[]
HResult -2146232798 int
InnerException null System.Exception
Message "" string
StackTrace "at Microsoft.AGL.Common.MISC.HandleAr()\r\nat
TabPageCollection.get_Count()\r\nat TabPageCollection.Clear()\r\nat
myApp.frmDisclaimer.LoadDisclaimers()\r\nat
myApp.frmDisclaimer.cbLanguage_SelectedIndexChanged()\r\nat
System.Windows.Forms.ComboBox.OnSelectedIndexChanged()\r\nat
System.Windows.Forms.ComboBox.WnProc()\r\nat
System.Windows.Forms.Control._InternalWnProc()\r\nat
OpenNETCF.Windows.Forms.ApplicationEx.DispatchMessage()\r\nat
OpenNETCF.Windows.Forms.ApplicationEx.Pump()\r\nat
OpenNETCF.Windows.Forms.ApplicationEx.RunMessageLoop()\r\nat
OpenNETCF.Windows.Forms.ApplicationEx.Run()\r\nat
myApp.Classes.StartUp.Main()\r\n" string
 
Back
Top