Exemplo n.º 1
0
        public override void Play()
        {
            //MainWnd.VideoWnd.panel1.BringToFront();
            //m_hr = m_VideoWindow.put_Owner(Main.MainWnd.s_MovieWnd.Handle);
            //DsError.ThrowExceptionForHR(m_hr);
            //m_hr = m_VideoWindow.put_WindowStyle(WindowStyle.Child | WindowStyle.ClipSiblings | WindowStyle.ClipChildren);

            m_hr = m_VideoWindow.put_WindowStyle(WindowStyle.Child | WindowStyle.ClipSiblings | WindowStyle.ClipChildren);
            DsError.ThrowExceptionForHR(m_hr);

            /*m_hr = m_VideoWindow.put_FullScreenMode(OABool.True);
             * m_VideoWindow.put_MessageDrain(Main.MainWnd.s_VideoWnd.Handle);*/

            if (Screen.AllScreens.Length > 1)
            {
                //Now
                Rectangle secondScreenRect = Screen.AllScreens[1].Bounds;
                m_VideoWindow.SetWindowPosition(secondScreenRect.Left, secondScreenRect.Top,
                                                secondScreenRect.Width, secondScreenRect.Height);
                //10, 10);
                //m_hr = m_VideoWindow.put_FullScreenMode(OABool.True);
                //DesktopLocation = tempRect.Location;
                //Size = tempRect.Size;
            }

            /*m_VideoWindow.SetWindowPosition(0, 0,
             *  MainWnd.VideoWnd.ClientSize.Width, MainWnd.VideoWnd.ClientSize.Height);*/
            m_VideoWindow.SetWindowForeground(OABool.False);
            VideoWndSwitch(true);
            base.Play();
        }
Exemplo n.º 2
0
        private void SetVideoWindow()
        {
            SetVideoPositions();
            _hiddenWindow.SizeChanged += _hiddenWindow_SizeChanged;

            if (_cursorHidden)
            {
                _videoWindow.HideCursor(OABool.True);
            }
            _videoWindow.put_Owner(VideoWindowHandle);
            _videoWindow.put_WindowStyle(DirectShowLib.WindowStyle.Child | DirectShowLib.WindowStyle.Visible | DirectShowLib.WindowStyle.ClipSiblings);
            _videoWindow.SetWindowForeground(OABool.True);

            //_videoWindow.put_FullScreenMode(OABool.True);

            if (_madvr != null)
            {
                SetExclusiveMode(false);
            }
        }