{"id":206480,"date":"2013-12-18T12:18:09","date_gmt":"2013-12-18T08:18:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=206480"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=206480","title":{"rendered":"<span class=\"post_title\">\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 ctrl-alt-delete, alt-tab, \u041f\u0443\u0441\u043a \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042d\u0442\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/tamas.io\/c-disable-ctrl-alt-del-alt-tab-alt-f4-start-menu-and-so-on\/\">tamas.io<\/a> \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u043a\u043b\u0430\u0432\u0438\u0448 Windows \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 C#. \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u044f \u0441 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432 \u0440\u0443\u043d\u0435\u0442\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0435\u0442, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u0441\u0435\u0442\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043c\u043d\u0435 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c!<br \/>  <a name=\"habracut\"><\/a><br \/>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 2007 \u0433\u043e\u0434\u0443 \u0438 \u043e\u043d\u0430 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0441\u0435\u0442\u0438 \u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <a href=\"http:\/\/stackoverflow.com\/questions\/2971097\/programatically-disabling-taskmanager-using-c-sharp\">StackOverflow<\/a> \u0438 <a href=\"http:\/\/www.dotnetspider.com\/forum\/233327-Disable-Alt-Tab-key.aspx\">DotNetSpider<\/a>, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u043d\u043e\u0432\u044c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0435\u0451. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0443\u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430 Windows 7, \u0432 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0451 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438.<br \/>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0448\u0443, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0432\u0438\u0448 \u0438 \u0438\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u0435\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u0431\u043e.<\/p>\n<p>  \u041d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u0430 C#, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \/ \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u0443\u044e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0430\u0432\u0438\u0448 CTRL-ALT-DEL. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u043d\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043a\u043e\u0434\u0430. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u00ab\u041f\u0443\u0441\u043a -&gt; \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u00bb \u0438 \u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 gpedig.msc. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a: \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&gt; \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b&gt; \u0421\u0438\u0441\u0442\u0435\u043c\u0430&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f CTRL-ALT-DEL (User Configuration &gt; Administrative Templates &gt; System &gt; CTRL+ALT+DELETE Options). \u042d\u0442\u043e \u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u0431\u043e. \u0414\u0432\u0430\u0436\u0434\u044b \u0449\u0451\u043b\u043a\u043d\u0438\u0442\u0435 \u043f\u043e \u00ab\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0437\u0430\u0434\u0430\u0447\u00bb (Remove Task Manager). \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 DisableTaskMgr \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0430\u043b\u0430 \u044f\u0441\u043d\u0435\u0435.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e, \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"cs\">using Microsoft.Win32;<\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cs\">public void KillCtrlAltDelete()         {             RegistryKey regkey;             string keyValueInt = &quot;1&quot;;             string subKey = @&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&quot;;              try             {                 regkey = Registry.CurrentUser.CreateSubKey(subKey);                 regkey.SetValue(&quot;DisableTaskMgr&quot;, keyValueInt);                 regkey.Close();             }             catch (Exception ex)             {                 MessageBox.Show(ex.ToString());             }         }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 CTRL-ALT-DEL. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c, \u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e. \u041a\u0430\u043a \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c ALT + F4? \u0412\u0441\u0435\u0433\u043e 5 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cs\">private void Form1_FormClosing(object sender, FormClosingEventArgs e)         {             e.Cancel = true;             base.OnClosing(e);         }<\/code><\/pre>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e. \u041e\u0431 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0438\u0437 \u0432\u0441\u0435\u0445 \u0431\u044b\u043b\u043e \u0448\u0442\u0443\u043a 15, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042f \u0434\u0430\u043c \u0432\u0430\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u0443\u043a. \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 LowLevelKeyboardProc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439:<\/p>\n<blockquote><p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 LowLevelKeyboardProc \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 SetWindowsHookEx. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432\u0432\u043e\u0434\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0432\u043e\u0442-\u0432\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430. \u0412\u0432\u043e\u0434 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 keybdevent. \u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 keybdevent, \u0442\u043e \u043e\u043d \u0431\u044b\u043b \u00ab\u0432\u0432\u0435\u0434\u0451\u043d\u00bb (injected). \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0445\u0443\u043a WHKEYBOARDLL \u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0445\u0443\u043a \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0417\u0430\u0442\u0435\u043c, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u0432\u0430\u043b\u043e \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p><\/blockquote>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435:<\/p>\n<pre><code class=\"cs\"> using System.Runtime.InteropServices; using System.Security.Principal; using System.Diagnostics; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0435\u0449\u0451 \u0432\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"cs\"> [DllImport(&quot;user32&quot;, EntryPoint = &quot;SetWindowsHookExA&quot;, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]         public static extern int SetWindowsHookEx(int idHook, LowLevelKeyboardProcDelegate lpfn, int hMod, int dwThreadId);         [DllImport(&quot;user32&quot;, EntryPoint = &quot;UnhookWindowsHookEx&quot;, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]         public static extern int UnhookWindowsHookEx(int hHook);         public delegate int LowLevelKeyboardProcDelegate(int nCode, int wParam, ref KBDLLHOOKSTRUCT lParam);         [DllImport(&quot;user32&quot;, EntryPoint = &quot;CallNextHookEx&quot;, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]         public static extern int CallNextHookEx(int hHook, int nCode, int wParam, ref KBDLLHOOKSTRUCT lParam);         public const int WH_KEYBOARD_LL = 13;          \/*code needed to disable start menu*\/         [DllImport(&quot;user32.dll&quot;)]         private static extern int FindWindow(string className, string windowText);         [DllImport(&quot;user32.dll&quot;)]         private static extern int ShowWindow(int hwnd, int command);          private const int SW_HIDE = 0;         private const int SW_SHOW = 1; public struct KBDLLHOOKSTRUCT         {             public int vkCode;             public int scanCode;             public int flags;             public int time;             public int dwExtraInfo;         }         public static int intLLKey;          public int LowLevelKeyboardProc(int nCode, int wParam, ref KBDLLHOOKSTRUCT lParam)         {             bool blnEat = false;              switch (wParam)             {                 case 256:                 case 257:                 case 260:                 case 261:                     \/\/Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key,                     blnEat = ((lParam.vkCode == 9) && (lParam.flags == 32)) | ((lParam.vkCode == 27) && (lParam.flags == 32)) | ((lParam.vkCode == 27) && (lParam.flags == 0)) | ((lParam.vkCode == 91) && (lParam.flags == 1)) | ((lParam.vkCode == 92) && (lParam.flags == 1)) | ((lParam.vkCode == 73) && (lParam.flags == 0));                     break;             }              if (blnEat == true)             {                 return 1;             }             else             {                 return CallNextHookEx(0, nCode, wParam, ref lParam);             }         } public void KillStartMenu()         {             int hwnd = FindWindow(&quot;Shell_TrayWnd&quot;, &quot;&quot;);             ShowWindow(hwnd, SW_HIDE);         } private void Form1_Load(object sender, EventArgs e)         {             intLLKey = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0]).ToInt32(), 0);         } <\/code><\/pre>\n<p>  \u0421\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043d\u043e\u0432\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0432 \u0432\u0441\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cs\"> public static void ShowStartMenu()         {             int hwnd = FindWindow(&quot;Shell_TrayWnd&quot;, &quot;&quot;);             ShowWindow(hwnd, SW_SHOW);         } public static void EnableCTRLALTDEL()         {             try             {                 string subKey = @&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&quot;;                 RegistryKey rk = Registry.CurrentUser;                 RegistryKey sk1 = rk.OpenSubKey(subKey);                 if (sk1 != null)                     rk.DeleteSubKeyTree(subKey);             }             catch (Exception ex)             {                 MessageBox.Show(ex.ToString());             }         } private void Form1_FormClosing(object sender, FormClosingEventArgs e)         {             UnhookWindowsHookEx(intLLKey);         } <\/code><\/pre>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u0438 \u0432\u044b \u043d\u0430\u0448\u043b\u0438 \u0432 \u043d\u0435\u0439 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435.<\/p>\n<p>  \u041e\u0442 \u0441\u0435\u0431\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044e, \u0447\u0442\u043e \u0432 .NET4 \u043a\u043e\u0434 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"cs\"> intLLKey = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0]).ToInt32(), 0); <\/code><\/pre>\n<p>  \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430:<\/p>\n<pre><code class=\"cs\"> var inst = LoadLibrary(&quot;user32.dll&quot;).ToInt32(); intLLKey = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, inst, 0); <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b AddHooks, \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<pre><code class=\"cs\"> LoadLibrary: [DllImport(&quot;kernel32&quot;, SetLastError = true, CharSet = CharSet.Unicode)] public static extern IntPtr LoadLibrary(string lpFileName); <\/code><\/pre>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445 \u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0443 \u2014 \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/206480\/\"> http:\/\/habrahabr.ru\/post\/206480\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042d\u0442\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/tamas.io\/c-disable-ctrl-alt-del-alt-tab-alt-f4-start-menu-and-so-on\/\">tamas.io<\/a> \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u043a\u043b\u0430\u0432\u0438\u0448 Windows \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 C#. \u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u044f \u0441 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432 \u0440\u0443\u043d\u0435\u0442\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0435\u0442, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u0441\u0435\u0442\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043c\u043d\u0435 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c!  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-206480","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/206480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=206480"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/206480\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=206480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=206480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=206480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}