Windows Control Library

G

Guest

Hi

I have developed a Windows Control Library in VC.NET
The component will play back video files and this component is used in C#
applications to display multiple videos simultaneously.
The problem I face in this is am not able to play more than one video
simultaneously. What could be the reason. When I play back a video other
currently playing video gets stopped.

Is Windows control library better than ActiveX control ?

Thanks in advance
Sudharsan
 
G

Guest

What are you using as a timer between frames?

System::Windows::Forms::Timer is suppressed if the message loop is busy for
longer than the interval of the timer. This can happen when the event
handler for one timer takes longer than the interval for that result. As a
result, the first timer always triggers right after its event handler
completes without ever giving time for the second timer to trigger.
 
G

Guest

Thanks for your kind reply
I dont use timer rather display each frame in a loop.
When I place multiple components and playback of two components
simultaneously is not possible. If I try to playback multiple at a time, the
earlier one stops and the next component starts playing. So what could I do
here.

Thanks
Sudharsan
 
G

Guest

If the two controls are running in the same thread (like when they are on the
same form) this won't work. The reason is that the second one is stuck in
the loop and never gives the first one a chance to run.

I think the way to fix this is to use a timer so that each component yields
some time to the other when it is done with its frame. Instead of a loop,
you will have a System::Windows::Forms::Timer that trigger at some specified
rate. When it triggers an event handler draws a single frame.

You can find some example code here:
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformscontrolmemberstopic.asp
 
G

Guest

Thanks for your kind reply.
When I am placing multiple components in a form, I think it will create
instance for each component. So if the form is a single thread then too each
component
as its own instance and execute independently.

When I multiple instance of the application then each application plays one
component simultaneously.

Windows control library gives a dll as output and this dll is loaded into
the C# application once and multiple instances have been open. I dont use any
global variable in my code.

I dont know whats happening.

Sudharsan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top