Search code examples
c#.netparental-control

c# Lock windows computer on startup


I'm trying to write a simple program for my little brother. He's behind his computer a lot of times but he should be learning simple arithmetics for school :D

I want to make the following program:

  • He starts up his computer
  • He needs to do a few simple exercises and complete
  • If he did an x amount correct, he can continue to use his computer.

Is there a simple (it doesn't need to be very clean xD) way of locking his computer untill my program says it can do so.

P.S. (I don't mean locking as in the standard mechanism in windows)

P.P.S. It does't need to be super high tech, just that an average computer user cannot bypass it by closing the software :P


Solution

  • You need some kind of system modal dialog (which isn't formally supported since win nt 4 (for some good reasons). However there is this blog that shows you how you can still accomplish the same thing.