Preventing user from open start menu

前端 未结 3 1938
渐次进展
渐次进展 2021-01-24 07:22

I have a program that should prevent the user from opening taskmanager and from openinig Start Menu. I have already added code to disable taskmanager and need now to prevent use

3条回答
  •  一个人的身影
    2021-01-24 07:59

    IntPtr trayHandle = FindWindow("Shell_TrayWnd", null);
    IntPtr buttonHandle = FindWindowEx(trayHandle, IntPtr.Zero, "Button", IntPtr.Zero);
    bool result = EnableWindow(buttonHandle, false);
    

    Those three functions are WinAPI: FindWindow, FindWindowEx and EnableWindow.

提交回复
热议问题