Yajuvendra Vant
Yajuvendra Vant

Reputation: 1127

How to disable windows startmenu using vb.net?

I am trying to disable windows start menu key and Ctrl+Esc and Alt-Tab for a Quiz project. Where user cannot press Startmenu. I was successful in disabling Ctrl+Alt+Del and Ctrl+Shift+Esc.
OS is XP.

Upvotes: 1

Views: 6441

Answers (2)

Stefan
Stefan

Reputation: 11509

this is one way to kill the Taskbar and Program Menu, just kill the process "explorer.exe". If you have a dedicated computer that only runs your program then it could be a solution.

Tested and worked on my computer:

Sub KillExplorer()

    Dim taskKill As ProcessStartInfo = New ProcessStartInfo("taskkill", "/F /IM explorer.exe")
    taskKill.WindowStyle = ProcessWindowStyle.Hidden
    Dim Process As Process = New Process()
    Process.StartInfo = taskKill
    Process.Start()
    Process.WaitForExit()

End Sub
Sub RestartExplorer()
    System.Diagnostics.Process.Start("explorer.exe")
End Sub

taskkill.exe is a util that you can find in windows\system32, for more information: http://technet.microsoft.com/en-us/library/bb491009.aspx

You cant kill explorer.exe with process.kill beacuse then it will only restart immediately, thats why I use taskkill instead.

Upvotes: 3

Hinek
Hinek

Reputation: 9729

You might want to try this tool from Microsoft, it may save you a lot of work: http://www.microsoft.com/downloads/details.aspx?familyid=d077a52d-93e9-4b02-bd95-9d770ccdb431&displaylang=en

You can use it to create a kiosk mode in Windows XP. I used a predecessor of this tool myself to create a environment for a quiz.

Upvotes: 3

Related Questions