0

创建将通过投影仪仅显示有界内容的应用程序的方法。简单场景 - 我在 C# 中有一个表单,具有图片框属性。我只想通过投影仪显示图片而不是整个桌面视图/表单。

4

1 回答 1

0

这应该在系统的最后一个屏幕上显示一个表单,将其完全填满,除了 PictureBox 之外没有其他任何内容:

public Form1()
{
   InitializeComponent();

   this.WindowState = FormWindowState.Maximized;
   this.Text = "";
   this.ControlBox = false;
   this.MinimizeBox = false;
   pictureBox1.Dock = DockStyle.Fill;

   // if you want the form to display on the last screen try this:
   this.Location = Screen.AllScreens
                  [Screen.AllScreens.Length - 1].WorkingArea.Location;

}

你必须决定pictureBox1.SizeMode..

当然,您必须知道,您的哪些屏幕设置为主要屏幕。

于 2014-09-07T15:25:20.040 回答