2007-07-12, 02:10 PM
(This post was last modified: 2007-07-12, 02:15 PM by HydroChronic.)
Hey Guys,
I am working on an alternate internal video player within my Plugin. I have based my internal player on UbuStream's WMP Player, but I have tweaked the interface and added my own features to some of the standard keyboard shortcuts (mainly to include marking commercials in the recording). But this is where I have run into my problem.
In order for player to be completely controlled by a remote control I have added an event listener to the Form's Keydown event. This works great except for one situation. When the user enters fullscreen mode, exits fullscreen mode and then re-enters fullscreen mode the Ctrl+F (fast forward button) and CTRL+B (blue button) no longer trigger the Keydown event. The only way that I have been able to find to solve this is to click on another component on the form other than the WMP ActiveX Component.
In order to put the form into a true fullscreen mode I have used a couple of Windows API calls. As documented by Microsoft (although I don't have the article handy), any form which takes up the entire screeen and a BoarderStyle of none will be recognized as a fullscreen form and automatically cover the taskbar. So in order to do that I use GetSystemMetrics() to get the size of the screen and then use SetWindowPos() to move the window to the top-left corner of the screen and resize it to be the size of the screen and finally maximize and remove the boarder of the form.
I will post my entire source code package when I get to work, I am pretty sure most everything else works (although feedback is always good). There are two libraries which you will need to put into your GBPVR directory in order to run the Plugin. These can be found in the "\Debug\bin" directory of the source code and are named "AxInterop.WMPLib.dll" and "Interop.WMPLib.dll".
Any help is much appreciated since I have been struggling with this for the past couple of weeks and I am completely out of ideas.
I am working on an alternate internal video player within my Plugin. I have based my internal player on UbuStream's WMP Player, but I have tweaked the interface and added my own features to some of the standard keyboard shortcuts (mainly to include marking commercials in the recording). But this is where I have run into my problem.
In order for player to be completely controlled by a remote control I have added an event listener to the Form's Keydown event. This works great except for one situation. When the user enters fullscreen mode, exits fullscreen mode and then re-enters fullscreen mode the Ctrl+F (fast forward button) and CTRL+B (blue button) no longer trigger the Keydown event. The only way that I have been able to find to solve this is to click on another component on the form other than the WMP ActiveX Component.
In order to put the form into a true fullscreen mode I have used a couple of Windows API calls. As documented by Microsoft (although I don't have the article handy), any form which takes up the entire screeen and a BoarderStyle of none will be recognized as a fullscreen form and automatically cover the taskbar. So in order to do that I use GetSystemMetrics() to get the size of the screen and then use SetWindowPos() to move the window to the top-left corner of the screen and resize it to be the size of the screen and finally maximize and remove the boarder of the form.
I will post my entire source code package when I get to work, I am pretty sure most everything else works (although feedback is always good). There are two libraries which you will need to put into your GBPVR directory in order to run the Plugin. These can be found in the "\Debug\bin" directory of the source code and are named "AxInterop.WMPLib.dll" and "Interop.WMPLib.dll".
Any help is much appreciated since I have been struggling with this for the past couple of weeks and I am completely out of ideas.