Disable Windows Navigation
-
Hi I'm developing a wpf application using visual studio 2010 in c#. for security reason, the navigation in the operating system is not allowed while running the application. That means once it is launched, all Windows menu, icons, toolbars ... must be hidden, and only the application must appear. (it's a kind of that the PC becomes only dedicated to it). Any suggestion or Idea ? Thanks in advance
-
Hi I'm developing a wpf application using visual studio 2010 in c#. for security reason, the navigation in the operating system is not allowed while running the application. That means once it is launched, all Windows menu, icons, toolbars ... must be hidden, and only the application must appear. (it's a kind of that the PC becomes only dedicated to it). Any suggestion or Idea ? Thanks in advance
I don't have any code but what I think you might want to look into is running the application in what is known as 'kiosk' mode.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
Hi I'm developing a wpf application using visual studio 2010 in c#. for security reason, the navigation in the operating system is not allowed while running the application. That means once it is launched, all Windows menu, icons, toolbars ... must be hidden, and only the application must appear. (it's a kind of that the PC becomes only dedicated to it). Any suggestion or Idea ? Thanks in advance
Sounds like what you want is a "kiosk" mode kinda thing. If so, you should add WindowStyle="None" and WindowState="Maximized" to the XAML of your main window. Further, you can even disable resizing and make it be the windows at the top from the start, adding ResizeMode="NoResize" and Topmost="True". Code would look like this:
Note that Windows keyboard shortcuts still work (Alt+Tab, Windows Key, Alt+F4). If you want to "disable" those, you will have to capture them, although opening applications in this manner (for example Windows+E for Windows Explorer) won't display the newly opened application since yours is Topmost as set in the property. [EDIT] The same can be achieved modifying those properties in the constructor, like so:
namespace WpfApplicationTest1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
ResizeMode = ResizeMode.NoResize;
Topmost = true;
}
}
}If you think you can do a thing or think you can't do a thing, you're right - Henry Ford Emmanuel Medina Lopez
-
Sounds like what you want is a "kiosk" mode kinda thing. If so, you should add WindowStyle="None" and WindowState="Maximized" to the XAML of your main window. Further, you can even disable resizing and make it be the windows at the top from the start, adding ResizeMode="NoResize" and Topmost="True". Code would look like this:
Note that Windows keyboard shortcuts still work (Alt+Tab, Windows Key, Alt+F4). If you want to "disable" those, you will have to capture them, although opening applications in this manner (for example Windows+E for Windows Explorer) won't display the newly opened application since yours is Topmost as set in the property. [EDIT] The same can be achieved modifying those properties in the constructor, like so:
namespace WpfApplicationTest1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
ResizeMode = ResizeMode.NoResize;
Topmost = true;
}
}
}If you think you can do a thing or think you can't do a thing, you're right - Henry Ford Emmanuel Medina Lopez
-
Hello Thanks for your reply. but with this solution the windows expolorer still work, for example when I push the keybord start button it still works, What I want to do is to diable all windows fonctionnality (like Windows +E ....) Thanks
I don't think, you can do this. And even if you did, the user could still press Ctrl + Alt + Del (which can't be intercepted as far as I know), open Task Manager and kill your application. I would suggest another appoach. Give the user only minimal rights (just to his user directory). Start your application under a different user who has access to the necessary directories. Require a password to close your application. Under this setup the Task Manager is of no use because the user can't kill other users' processes.
The good thing about pessimism is, that you are always either right or pleasently surprised.
-
Hello Thanks for your reply. but with this solution the windows expolorer still work, for example when I push the keybord start button it still works, What I want to do is to diable all windows fonctionnality (like Windows +E ....) Thanks
aymen amri wrote:
but with this solution the windows expolorer still work, for example when I push the keybord start button it still works
The keyword was "Kiosk mode". DuckDuckGo it, and you'll come across checklists like this one[^].
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]