threading problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



i try to implement simple threading im my application and i get this error
message :

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.windows.forms.dll
Additional information: The action being performed on this control is being
called from the wrong thread. You must marshal to the correct thread using
Control.Invoke or Control.BeginInvoke to perform this action.

on this line on one of two threads that i have in my application:
tree.Nodes.Add(Nodex)


TreeView is declared on form not on current thread. Why, any ideas? Any
examples any ideas Any help anything
THX


.



Relevant Pages

  • Re: convert a string to a binary
    ... An unhandled exception of type 'System.ArgumentException' occurred in ... database, this field is of type Binaries, so is Byte the right type in ... Thx ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • detect mouse event on node of a treeview
    ... I'd like to get the selected node when the user select a node in my ... treeview. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Server Error in / Application.
    ... The error looks like it could be coming from the unsupported MS Treeview ... An unhandled exception occurred during the execution of the ... > current web request. ... > be identified using the exception stack trace below. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Additional information: Exception has been thrown by the target of an invocation.
    ... >> An unhandled exception of type ... >> invocation. ... >> thx in andvance ... > returning Null for some reason, ...
    (microsoft.public.dotnet.framework)
  • Unable to connect to MSSQL...return error
    ... My web service cannot connect to My MsSql DB. ... An unhandled exception of type 'System.Web.Services.Protocols.SoapException' ... Connection code ... Prev by Date: ...
    (microsoft.public.dotnet.framework.webservices)