Disable the Comination Keys Strokes in C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U3VuZGFy?=

    Disable the Comination Keys Strokes in C#

    Hello ALL,

    I want some help on

    How to Disable the Combination Keys stokes like ALT+CTRL+DEL, ALT+TAB or any
    other Combination using C#.

    Hope for your response.
    --
    Best Regards,
    Sundar Shrestha
  • Family Tree Mike

    #2
    Re: Disable the Comination Keys Strokes in C#

    There are ways to do this in an application, but you shouldn't. Imagine if
    you opened MS Word and you expected to be able to switch to Internet
    Explorer with Alt-Tab. You probably would not like it.

    "Sundar" <Sundar@discuss ions.microsoft. comwrote in message
    news:830EADFA-CB5A-4F8B-AEFC-B69F30607DEC@mi crosoft.com...
    Hello ALL,
    >
    I want some help on
    >
    How to Disable the Combination Keys stokes like ALT+CTRL+DEL, ALT+TAB or
    any
    other Combination using C#.
    >
    Hope for your response.
    --
    Best Regards,
    Sundar Shrestha

    Comment

    • =?Utf-8?B?anAybXNmdA==?=

      #3
      Re: Disable the Comination Keys Strokes in C#

      Mike,

      Imagine having Machines out on the floor and an application you wrote keeps
      someone from accidentally getting killed.

      The employee running it is paid as little as the company can get away with,
      and he has very few skills other than knowing how to kill your program with
      CTRL-ALT-DEL or finding a way to browse to some games using ALT-TAB to access
      anything else that happens to be running. Now he is surfing the 'net, playing
      cards, or whatever, cuts his arm off because he wasn't paying attention, and
      the company comes to you because they were using software that you wrote.

      Sundar: I do not know how to disable this feature, but I will watch it
      because I want to know as well. Hopefully, someone that knows how will chime
      in. I know your Administrator can enable this feature, but if your
      Administrator is like ours, he isn't very friendly when it comes to this.

      "Family Tree Mike" wrote:
      There are ways to do this in an application, but you shouldn't. Imagine if
      you opened MS Word and you expected to be able to switch to Internet
      Explorer with Alt-Tab. You probably would not like it.
      >
      "Sundar" <Sundar@discuss ions.microsoft. comwrote in message
      news:830EADFA-CB5A-4F8B-AEFC-B69F30607DEC@mi crosoft.com...
      Hello ALL,

      I want some help on

      How to Disable the Combination Keys stokes like ALT+CTRL+DEL, ALT+TAB or
      any
      other Combination using C#.

      Hope for your response.
      --
      Best Regards,
      Sundar Shrestha
      >
      >

      Comment

      • Paul E Collins

        #4
        Re: Disable the Comination Keys Strokes in C#

        "Sundar" <Sundar@discuss ions.microsoft. comwrote:
        How to Disable the Combination Keys stokes like ALT+CTRL+DEL, ALT+TAB or
        any other Combination using C#.
        Ctrl+Alt+Del is reserved for the operating system. That's why pressing those
        keys to log on to a workstation guarantees that you aren't typing your
        password into a malicious replacement login program. You can't override it
        without some very complicated stuff (look up "GINA") and certainly not with
        C# code.

        Eq.


        Comment

        • Family Tree Mike

          #5
          Re: Disable the Comination Keys Strokes in C#

          Here are two previous discussions on the VB.Net side. The logic applies to
          the problem rather than the specific language (vb vs. c#).





          "jp2msft" <jp2msft@discus sions.microsoft .comwrote in message
          news:7442785C-8592-4E3D-8164-B69EE340DBCB@mi crosoft.com...
          Mike,
          >
          Imagine having Machines out on the floor and an application you wrote
          keeps
          someone from accidentally getting killed.
          >
          The employee running it is paid as little as the company can get away
          with,
          and he has very few skills other than knowing how to kill your program
          with
          CTRL-ALT-DEL or finding a way to browse to some games using ALT-TAB to
          access
          anything else that happens to be running. Now he is surfing the 'net,
          playing
          cards, or whatever, cuts his arm off because he wasn't paying attention,
          and
          the company comes to you because they were using software that you wrote.
          >
          Sundar: I do not know how to disable this feature, but I will watch it
          because I want to know as well. Hopefully, someone that knows how will
          chime
          in. I know your Administrator can enable this feature, but if your
          Administrator is like ours, he isn't very friendly when it comes to this.
          >
          "Family Tree Mike" wrote:
          >
          >There are ways to do this in an application, but you shouldn't. Imagine
          >if
          >you opened MS Word and you expected to be able to switch to Internet
          >Explorer with Alt-Tab. You probably would not like it.
          >>
          >"Sundar" <Sundar@discuss ions.microsoft. comwrote in message
          >news:830EADF A-CB5A-4F8B-AEFC-B69F30607DEC@mi crosoft.com...
          Hello ALL,
          >
          I want some help on
          >
          How to Disable the Combination Keys stokes like ALT+CTRL+DEL, ALT+TAB
          or
          any
          other Combination using C#.
          >
          Hope for your response.
          --
          Best Regards,
          Sundar Shrestha
          >>
          >>

          Comment

          • Peter Duniho

            #6
            Re: Disable the Comination Keys Strokes in C#

            On Sun, 24 Aug 2008 09:24:06 -0700, jp2msft
            <jp2msft@discus sions.microsoft .comwrote:
            Imagine having Machines out on the floor and an application you wrote
            keeps
            someone from accidentally getting killed. [...]
            All due respect, if you've got a machine that keeps someone from getting
            killed, Windows isn't the right operating system. Neither is Linux, Mac
            OS, or Unix for that matter.

            For less critical applications, but where it's still important to keep
            users from meddling, there are certain techniques that apply. But they
            generally involve not giving the user access to the application (the
            critical parts run as a service, for example) or to the input device (not
            providing a keyboard, for example). The Ctrl-Alt-Del combination is
            particular difficult-to-impossible to block in software, because it has a
            very special, high-priority-override meaning in Windows. If Windows
            provided an approved mechanism for disabling or otherwise diverting that
            key combination, it could cause serious security issues when that
            mechanism was used by malicious software.

            Some of the other combinations might be interceptable by keyboard hooks or
            the like, but even there one should tread cautiously. It's practically
            never the correct solution for one application to hijack the operating
            system's normal UI behavior.

            Pete

            Comment

            • =?Utf-8?B?anAybXNmdA==?=

              #7
              Re: Disable the Comination Keys Strokes in C#

              I'd love to forward your message to my managers and VPs here, but I know they
              would not read it and it would likely result in my unemployment. :)

              "Peter Duniho" wrote:
              On Sun, 24 Aug 2008 09:24:06 -0700, jp2msft
              <jp2msft@discus sions.microsoft .comwrote:
              >
              Imagine having Machines out on the floor and an application you wrote
              keeps
              someone from accidentally getting killed. [...]
              >
              All due respect, if you've got a machine that keeps someone from getting
              killed, Windows isn't the right operating system. Neither is Linux, Mac
              OS, or Unix for that matter.
              >
              For less critical applications, but where it's still important to keep
              users from meddling, there are certain techniques that apply. But they
              generally involve not giving the user access to the application (the
              critical parts run as a service, for example) or to the input device (not
              providing a keyboard, for example). The Ctrl-Alt-Del combination is
              particular difficult-to-impossible to block in software, because it has a
              very special, high-priority-override meaning in Windows. If Windows
              provided an approved mechanism for disabling or otherwise diverting that
              key combination, it could cause serious security issues when that
              mechanism was used by malicious software.
              >
              Some of the other combinations might be interceptable by keyboard hooks or
              the like, but even there one should tread cautiously. It's practically
              never the correct solution for one application to hijack the operating
              system's normal UI behavior.
              >
              Pete
              >

              Comment

              • Ken Foskey

                #8
                Re: Disable the Comination Keys Strokes in C#


                It is actually very easy to remove Ctrl-Alt-Del from Linux for reboot.
                You can even remove the Power switch monitor.

                One way to manage killing applications is to have another process monitor
                the first and restart it if it fails.

                Comment

                Working...