最主要的问题VC#.NET Form应用程序

时间:2018-11-30 19:43:02

标签: c# .net forms topmost

您好,我想将我的应用置于全屏应用的顶部。我仅在窗口化应用程序中得到此信息,而在全屏应用程序中却没有得到解决方案?

using System;
using System.Drawing;
using System.Windows.Forms;

namespace GamingHelper
{
    public partial class Form1 : Form
    {

        int screenWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
        int screenHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
        public Form1()
        {
            InitializeComponent();
            this.TopMost = true;
            this.Width = screenWidth / 5;
            this.Height = screenHeight / 5;
            BackColor = Color.Lime;
            TransparencyKey = Color.Lime;
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

0 个答案:

没有答案