ListView.Items.Clear Throw not supportet error!

  • Thread starter Thread starter Benjamin
  • Start date Start date
B

Benjamin

Hi,

i use the ListView1.Items.Clear to clear all the Items. In VS2003 it
works fine, now i paste the code in VS2005 and it throws the error:

System.NotSupportedException wurde nicht behandelt.
Message="Es kann keine Fehlermeldung angezeigt werden, da die
optionale Ressource der Assembly, die die Fehlermeldung enthält, nicht
gefunden wurde."
StackTrace:
bei Microsoft.AGL.Common.MISC.HandleAr()
bei System.Windows.Forms.ListView.ntvDeleteItem()
at ListViewItemCollection.Clear()
bei netplus.frmMessage.TickEval()
bei netplus.Kommunikation.UpdateNonScreen()
bei netplus.Kommunikation.MainBusCycle()

The MSDN says support for CF1.0 and CF2.0, but it dont works?

Benjamin
 
So why don't you install mentioned optional resource assembly (please search
this NG or MSDN if you don't know how) and get a real message which
hopefully would clarify what's wrong.

I would guess you'll get this message:



Control.Invoke muss fur die Interaktion mit Steuerelementen verwendet
werden, die in einem eigenen Thread erstellt wurden.



If that's the one, the fix is pretty clear - use Control.Invoke (again,
please search this NG or MSDN if you don't know how).



--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Hi,

i use the ListView1.Items.Clear to clear all the Items. In VS2003 it
works fine, now i paste the code in VS2005 and it throws the error:

System.NotSupportedException wurde nicht behandelt.
Message="Es kann keine Fehlermeldung angezeigt werden, da die
optionale Ressource der Assembly, die die Fehlermeldung enthält, nicht
gefunden wurde."
StackTrace:
bei Microsoft.AGL.Common.MISC.HandleAr()
bei System.Windows.Forms.ListView.ntvDeleteItem()
at ListViewItemCollection.Clear()
bei netplus.frmMessage.TickEval()
bei netplus.Kommunikation.UpdateNonScreen()
bei netplus.Kommunikation.MainBusCycle()

The MSDN says support for CF1.0 and CF2.0, but it dont works?

Benjamin
 
Hi,

thanks for answer. I tried it with the Invoke, and it works now.
Thanks. But how i have to install the optional Resource Assembly?
 
http://www.google.com/search?hl=en&q=How+do+I+install+Optional+Resource+assembly?&btnG=Google+Search

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Hi,

thanks for answer. I tried it with the Invoke, and it works now.
Thanks. But how i have to install the optional Resource Assembly?
 
Back
Top