I'm trying to build an application that needs to lock down access to the PC while it is running. I need to make the app run topmost, in full screen mode, and ensure that alt-tabbing doesn't allow access to other apps or the taskbar.
So far I have set TopMost = true, WindowStyle = WindowStyle.None and WindowState = WindowState.Maximized which achieves most of what I need, but I still get instances where the taskbar becomes visible. I've tried to implement the LostFocus behaviour on the window, but that doesn't seem to give me the behaviour I need.
Can anyone point me in the direction I need to implement this behaviour, please?
Additional Info
Unfortunately, the nature of this project is such that we can't alter the client machines, and they are running a mix of XP, Vista and Win7. The PCs are not owned by us, but are to be used for delivery of content in as secure a manner as possible. The owners of the PCs are aware of the restrictions for running the software, and are happy for them to be "locked down" during execution of our application, but they cannot otherwise be altered.
Other ways
HakonB mentioned Scott Hanselman's BabySmash application, so I went looking for his way of handling the situation. As HakonB says, it isn't the cleanest method of handling lost focus, but it seems to work, or at least should do until I find a better solution. He uses a timer that fires every second, and fires off a call to user32.dll's SetForegroundWindow(IntPtr hWnd) method to grab focus, regardless of whether it has focus or not. Thanks for the heads-up, HakonB!