Click here to Skip to main content
14,365,441 members
Rate this:
Please Sign up or sign in to vote.
See more:
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


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;
}
Posted
Updated 13-Feb-17 20:55pm
v2
Comments
[no name] 13-Feb-17 6:42am
   
The search term you are looking for is "kiosk mode"
Member 12545398 13-Feb-17 6:57am
   
Thank for reply! Yes, kiosk mode is perfect solution for such type of scenario. I have tried kiosk mode. For a kiosk device to run a Windows app,i used the assigned access feature as well. Where we can run only app that is downloaded from Store or Universal Windows Platform (UWP). How i can run winform self developed software like kiosk mode.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Just set the form to Topmost with no border style, then set maximized.

Note: This must be done in the order below or it will not work correctly.
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;
}
   
Comments
Member 12545398 14-Feb-17 1:47am
   
I have tried this solution as well, but problem in this solution is that if u press window key from keypoard or alt+clt+del then u can do what ever u want. We can disable keyboard window key but this is not complete solution. Is there any anther way we can do ?
Ramza360 14-Feb-17 15:24pm
   
Since WinForms does not support the kiosk mode, you are going to have to disable those keys, and task manager shortcuts. There are some examples of this here: http://stackoverflow.com/questions/3213606/how-to-suppress-task-switch-keys-winkey-alt-tab-alt-esc-ctrl-esc-using-low

The above link apparently works in some situations, but not all. Might consider switching to WPF?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100