Why does running Dual Monitor break my C# Video Application?

Posted on 2007-11-26
Last Modified: 2013-12-16
Hello everyone,

Does anyone have any insight as too why my C# .NET 2.0 application cannot display it's video when moved over to a Dual monitor?

The video shows fine when on the main display, but once moved over to the Second display/Dual monitor the video dissappears. The application is still running, but no video. When I move the application back to the main display the video appears instantly.

- The applicaton is a Visual C# .NET 2.0 app
- The video comes from a C++ DLL that was marshalled to communicate with it. However this same problem occured in the old C++ application that used the same video DLL's, so I don't think it has anything to do with the DLL's.
- I'm using panels to display the video in. I give the DLL the panels HANDLE and it sends the vide there.

It's like the application forgets what the panel's HANDLE was.

Any information you have is useful at this point. Thanks. :)
Question by:VirtueTech
  • 5
  • 4
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20351876
You say you move the video while playing?
If your video is played with some hardware-related technique like DirectX, you cannot switch while running.

Author Comment

ID: 20352045

I gave that a didn't make a difference. I started the application. Moved the application over to the second/dual monitor view. Then started the Video. It didn't show the video.

Thanks for the reply though.

any other ideas?
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20352102
make some trick to start the application in the second monitor, without moving. And test.
Maybe the video library is initializing with the first monitor parameters. Just a hunch.

Author Comment

ID: 20352111
Maybe. I'm not familiar with starting my app in the "extended" part of my monitor. I'll have to look into it.
LVL 12

Assisted Solution

andrewjb earned 100 total points
ID: 20356496
Can you play the video at all (using some other s/w) on the second monitor? In case it doesn't have DirectX installed at all....
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.


Author Comment

ID: 20360657
Actually the video comes from a H.264 card, which pushes through a C++ DLL. I tell the DLL what the HANDLE of my windows form control is, and it uses that HANDLE to play the video on.

I don't have any DirectX API usage in my application.
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20360735
even worst, surely your h.264 is sending the video directly to the primary video card.

Author Comment

ID: 20409371
I believe it does go directly to the video card, it is handled from the DLL we have. Do you have any other ideas or things I might be able to do to put a finger on why it doesn't work?
LVL 55

Accepted Solution

Jaime Olivares earned 400 total points
ID: 20409406
I think you have to ask to the DLL provider about the specific behaviour of it. This problem is not related to C# or .net.

Author Comment

ID: 20412593
yeah...I have...thanks for your comments everyone.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Runtime Error 2 28
Angular JS Route 3 54
Not showing JavaScript in the list 5 40
Exit the loop 4 37
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now