HighTechTalks DotNet Forums  

thread differences from button_click and timer_elapsed (winForms - interop)

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss thread differences from button_click and timer_elapsed (winForms - interop) in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Victor Reboucas
 
Posts: n/a

Default thread differences from button_click and timer_elapsed (winForms - interop) - 05-22-2007 , 08:24 PM






Hi, I'm experiencing some kind of thread behavior problem in a WinForms app
in Vb.Net 2.0.

Actually I'm doing some huge interop using DirectShow to interact with my
miniDV camera.

The problem is that if I put the code to read the camera's timecode inside a
button_click routine it works just fine, but, if I put that code to run on a
timer_elapsed event I get error (in particular, NotImplementedException from
the interop layer).

The question is: what is different in calling a method in a button click
routine and in a timer elapsed event (in threads meaning) for the interop
layer, is that the "user
interaction" (button click) that creates a new thread automatically or sth
like that?


Thanks for any clue,
Victor




Reply With Quote
  #2  
Old   
Victor Reboucas
 
Posts: n/a

Default Re: thread differences from button_click and timer_elapsed (winForms - interop) - 05-22-2007 , 08:57 PM






Found that... just change the system.timers.timer to forms.timer to run all
operations on the same thread.



"Victor Reboucas" <vcreb (AT) hotmail (DOT) com> wrote

Quote:
Hi, I'm experiencing some kind of thread behavior problem in a WinForms
app
in Vb.Net 2.0.

Actually I'm doing some huge interop using DirectShow to interact with my
miniDV camera.

The problem is that if I put the code to read the camera's timecode inside
a
button_click routine it works just fine, but, if I put that code to run on
a
timer_elapsed event I get error (in particular, NotImplementedException
from
the interop layer).

The question is: what is different in calling a method in a button click
routine and in a timer elapsed event (in threads meaning) for the interop
layer, is that the "user
interaction" (button click) that creates a new thread automatically or sth
like that?


Thanks for any clue,
Victor






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.