【发布时间】:2018-09-30 21:15:01
【问题描述】:
我一直在尝试在 Windows Media Player 按钮上设置一个隐藏按钮,但无论我如何尝试,它总是显示为灰色
axWindowsMediaPlayer1.Location = new Point(0, 0);
axWindowsMediaPlayer1.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
axWindowsMediaPlayer1.URL = "assets//vid//INTRO//INTRO_START.mp4";
axWindowsMediaPlayer1.Ctlcontrols.play();
axWindowsMediaPlayer1.uiMode = "none";
axWindowsMediaPlayer1.enableContextMenu = false;
startButton.Location = new Point(524, 741);
startButton.Size = new Size(1070, 236);
startButton.FlatStyle = FlatStyle.Flat;
startButton.BackColor = Color.Transparent;
startButton.FlatAppearance.BorderSize = 0;
startButton.Click += StartButton_Click;
this.Controls.Add(startButton);
startButton.BringToFront();
按钮的背景是灰色的,输出总是相同的
【问题讨论】:
-
我看不到任何按钮。但是:我认为无论如何都不允许透明元素接受用户交互;这将是一个糟糕的用户体验,不是吗?
-
建议:试试
startButton.FlatStyle = FlatStyle.Popup
标签: c# winforms button video transparent