Results 1 to 3 of 3

Thread: funny error

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    funny error

    i have a folderwatch class that monitors a folder for created files.
    when a file is created, it triggers an event. in this case i call a function on my main form which tries to add a node to a treeview on the main form.
    i get this error: "the action being performed on the control cannot be called from the specified thread" and then something about using control.invoke and control.begininvoke.

    any ideas whatsoever????

  2. #2

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    i worked it out. finally.

    you use:


    mainform.invoke(....

    i still don't understand why there is this threading problem. if anybody could explain, that would be nice...

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    The main problem with threading is that any obj created on the main thread can't be shown on the main thread ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width