[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

thread differences from button_click and timer_elapsed (winForms - interop

Victor Reboucas

5/23/2007 12:25:00 AM

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



2 Answers

Victor Reboucas

5/23/2007 12:58:00 AM

0

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



"Victor Reboucas" <vcreb@hotmail.com> wrote in message
news:OgrsuCNnHHA.4896@TK2MSFTNGP02.phx.gbl...
> 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
>
>
>


Jeff

12/16/2009 5:56:00 PM

0

On Dec 15, 9:16 pm, LookingGlass <goldencocke...@gmail.com> wrote:
> On Dec 15, 6:51 pm, Jeff <yourimageunre...@yahoo.com> wrote:
>
>
>
> > On Dec 15, 12:11 pm, BLACKPOOLJIMMY <Blackpoolji...@aol.com> wrote:
>
> > > Lucy:
>
> > >http://www.youtube.com/watch?v=7...
>
> > I don't think the song is very good. Thanks for the link.
>
> Not *memorable*. Done for charity.
>
> www.Shemakhan.com

It might sound better with some production, done
with charity.