C#DirectX视频播放器问题. [英] C # directx video player problems.

查看:177
本文介绍了C#DirectX视频播放器问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了
私人视频MyVideo = null;
.......(忽略一些无关紧要的内容)
MyVideo.Owner = panel1;
我想通过双击播放目标来全屏播放,因此可以使用panel1_MouseDoubleClick()函数来实现,但是在实际播放中,panel1双击事件是不可能的,它可能已被视频覆盖.
如何才能实现双屏视频播放以达到全屏的目的?
谢谢.

I set
private Video MyVideo=null;
.......(Omit some of the irrelevant)
MyVideo.Owner = panel1;
I want to play full screen by double-clicking to play goal, so with panel1_MouseDoubleClick () function to achieve, but in a real play, panel1 double-click event has been impossible, it maybe covered by video.
How we can achieve double-screen video playback to achieve the purpose of full screen?
Thanks.

推荐答案

尝试这种方式
try this way
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            panel1.Dock = DockStyle.Fill;
        }

        private void panel1_DoubleClick(object sender, EventArgs e)
        {
            if (this.WindowState != FormWindowState.Maximized)
            {
                this.WindowState = FormWindowState.Maximized;
                this.FormBorderStyle = FormBorderStyle.None;
            }
            else
            {
                this.WindowState = FormWindowState.Normal;
                this.FormBorderStyle = FormBorderStyle.Fixed3D;
            }
        }
    }


这篇关于C#DirectX视频播放器问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆