问题描述
I have developed Point of sale application in c# and i have following two requirements:
1. I want when user start up computer then POS will start up automatic
Solutions Tried : I Know there is a startup folder where we can copy shortcut of software and on computer start up this application will start up automatic. Is there any better practice to that.
2. User not able to see taskbar or POS will cover whole screen. Requirement is user cannot use computer for another purpose.
I have no idea how to implement 2.
我尝试了什么:
What I have tried:
For first req: I Know there is a startup folder where we can copy shortcut of software and on computer start up this application will start up automatic. Is there any better practice to that
第二次请求尝试的解决方案如下。有了这个解决方案,我们可以隐藏任务栏,但如果我们按下窗口键形式键盘,那么我们可以做任何事情。所以我正在寻找能够通过良好解决方案解决这个问题的解决方案。
public void EnterFullScreenMode(Form targetForm)
{
targetForm.WindowState = FormWindowState.Normal;
targetForm.FormBorderStyle = FormBorderStyle.None;
targetForm.WindowState = FormWindowState.Maximized;
}
Solution tried for 2nd req is following. With this solution we can hide task bar but if we press window key form keyboard then we can do any thing. So i am looking for solution that can solve this problem with good solution.
public void EnterFullScreenMode(Form targetForm)
{
targetForm.WindowState = FormWindowState.Normal;
targetForm.FormBorderStyle = FormBorderStyle.None;
targetForm.WindowState = FormWindowState.Maximized;
}
推荐答案
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.TopMost = true;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
}
或者你可以参加活动而不是覆盖。
Alternatively you can hook to the event rather than overriding.
private void Form1_Load(object sender, EventArgs e)
{
this.TopMost = true;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
}
这篇关于如何在软件运行时覆盖PC屏幕,隐藏任务栏。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!