Windows Develop Bookmark and Share   
 index > Windows Forms General > Need suggestion...
 

Need suggestion...

Hello,

I am programing an application consisting of multiple panels that display videos. A common Playback functionality is provided to control all the panels i.e: to play, pause, stop the videos in them respectively. I am using Directshow to deal with the multimedia playback.

I want to apply the playback functionality to all the panels to occur at the same time. Like if I am loading 4 videos in 4 panels then I want all of them to be loaded at the same time. Instead of loading one by one. Similarly if I apply stop to stop all the videos I want all of them to be stopped at the same time. As of now it is clearly visible that load and stop operations are performed sequentially in my application that is clearly visible to the human eye, which is not wanted.

I think multithreading is the solution but not sure, as I am new to C# and have never built any multithreaded application before. If so, then suggest what steps I should follow. Is using delegate is the answer? still I am not sure.

Kindly suggest me any solution to cater this functionality so that I could load multiple videos and perform playback operations on them.

Regards

Reenaz  Thursday, February 21, 2008 4:50 AM

Hi,

The response is late but I hope you are still tuned. Yes you can use threading to do multiple time consuming operations (e.g. loading videos) and keep the UI responsive in the mean time. And you can learn the basics of managed threading here:

http://msdn2.microsoft.com/en-us/library/0ka9477y.aspx

There isa BackgroundWorkercomponent which enables you to create a background thread to do some work easily. Itresides in the toolbox of the Visual Studio, so can just drag itinto your form and subscribe its events. You can find more infomation here:

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

Best Regards

Chunsheng Tang

Chunsheng Tang  Tuesday, February 26, 2008 5:42 AM

Hi,

The response is late but I hope you are still tuned. Yes you can use threading to do multiple time consuming operations (e.g. loading videos) and keep the UI responsive in the mean time. And you can learn the basics of managed threading here:

http://msdn2.microsoft.com/en-us/library/0ka9477y.aspx

There isa BackgroundWorkercomponent which enables you to create a background thread to do some work easily. Itresides in the toolbox of the Visual Studio, so can just drag itinto your form and subscribe its events. You can find more infomation here:

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

Best Regards

Chunsheng Tang

Chunsheng Tang  Tuesday, February 26, 2008 5:42 AM

You can use google to search for other answers

Custom Search

More Threads

• Default values in combo box at form load
• Update textbox text by a buttpn click in another form
• iis checking
• Take BackUP Of Acess Databse
• Reading the data from DataGridview Cell during a click event.
• Bitmap To Array
• Failed to load toolbox item "TextControl".It will be removed from the toolbox.
• Storing configuration information in external XML file
• How do I send data to an Epson TM-T88IV receipt printer from c# code?
• Changing the title text for MDI parent form