Welcome to the leading network for technology professionals

Disable the Alt+Tab,Alt+Esc,Ctrl+Esc,Ctrl+Alt+del through C# program.....Please help me!!!!!!!!!

Dear Friends,
How do I Disable the Alt+Tab,Alt+Esc,Ctrl+Esc,Ctrl+Alt+del through C# program?
I am new to C# programming...If any one knows please let me know.... code or tips are always welcome

Advance thanks...


Thanks,
Sharmili


I have pasted vb.Net code...i don't know how to convert vb.net to C#..If any one know please help me .. This is not included (Ctrl+Alt+Del)

Public Class frmMain
    Inherits System.Windows.Forms.Form

    Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Integer, ByVal lpfn As LowLevelKeyboardProcDelegate, ByVal hMod As Integer, ByVal dwThreadId As Integer) As Integer
    Declare Function UnhookWindowsHookEx Lib "user32" Alias "UnhookWindowsHookEx" (ByVal hHook As Integer) As Integer
    Delegate Function LowLevelKeyboardProcDelegate(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer
    Declare Function CallNextHookEx Lib "user32" Alias "CallNextHookEx" (ByVal hHook As Integer, ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer

    Const WH_KEYBOARD_LL = 13

    Structure KBDLLHOOKSTRUCT
        Dim vkCode As Integer
        Dim scanCode As Integer
        Dim flags As Integer
        Dim time As Integer
        Dim dwExtraInfo As Integer
    End Structure

    Dim intLLKey As Integer

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        intLLKey = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf LowLevelKeyboardProc, System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32(), 0)
    End Sub

    Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        UnhookWindowsHookEx(intLLKey)
    End Sub

    Private Function LowLevelKeyboardProc(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer
        Dim blnEat As Boolean = False

        Select Case wParam
            Case 256, 257, 260, 261
                'Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key
                blnEat = ((lParam.vkCode = 9) AndAlso (lParam.flags = 32)) Or _
                ((lParam.vkCode = 27) AndAlso (lParam.flags = 32)) Or _
                ((lParam.vkCode = 27) AndAlso (lParam.flags = 0)) Or _
                ((lParam.vkCode = 91) AndAlso (lParam.flags = 1)) Or _
                ((lParam.vkCode = 92) AndAlso (lParam.flags = 1))
        End Select

        If blnEat = True Then
            Return 1
        Else
            Return CallNextHookEx(0, nCode, wParam, lParam)
        End If
    End Function
    Friend WithEvents lblInfo As System.Windows.Forms.Label
End Class


Access the solution to this problem by joining the community

Trusted by 44 of the top 50 Fortune 500 companies

Why It Works

Harness the power of technology experts from around the world. Quickly find verified solutions to complex technical problems, expand your skills with interactive resources, and network with other professionals on Experts Exchange. Our global expert community helps you get your job done fast and become an even better technology professional.

From Experts Exchange

Don't just take our word for it.

"Three years back we had a client requirement for developing an asset tracking solution that required data acquisition from different data sources. I was assigned the role of DBA. With no practical experience in database administration, I was clueless on how to proceed. Thanks to the guidance and support of Experts Exchange's vast talent pool, I was able to complete the data integration process in less than a week's time, which saved our company more than $2000 worth of man-hours and got me a promotion!"

Sherkar Bhurshan
RFID Consultant at Aplomb Global IT Consultants

Don't just take our word for it.

"My Staff and I use EE on a daily bases to solve all kinds of issues. One answer can be worth the cost of a lifetime membership! For example, we ran into a bunch of problems when migrating our Exchange environment from 2003 to 2010. We kept running into issues and repeatedly the best and most detailed info was coming from Experts Exchange. One of the last issues was getting active sync and OWA published correctly and the partners we were using were struggling for hours. Finally I decided to go look for my own answers and was able to find what was looking for on Experts Exchange. It was a life saver!"

Jakub Hanson
Director of Infrastructure at Noel Group LLC

Don't just take our word for it.

"A few years back, I worked for a British bank in compliance. When the bank sold its trading department to an American company, the compliance systems had to change rapidly to avoid managers being charged with not submitting compliance reports to the government, which would have been a criminal offence. Experts Exchange helped me get the job done on time."

Murray Brown
Programmer at Murbro Ltd

Why Experts Exchange

  • Trusted

    Used by 1,000's of top technology professionals worldwide

  • Verified

    Over 4 million real-world solutions

  • Established

    Solving challenging and complex technical issues since 1996

Experts in your Pocket

Experts Exchange is optimized to run on your smartphone or tablet. Bring the technology network with you everywhere you need to be.

Meet the Experts

Comprised of leaders and professionals in technology fields, including hundreds of Microsoft MVPs, our Experts are passionate about sharing their expertise with members on the Experts Exchange Network.
  • Steve Light oversees the database management of the United States government. He has answered over 6,000 questions during his time on the network. An Oracle specialist, he also provides expertise in .NET, MS Access and more.

  • Alison Balter is the author of 14 MS Access and SQL Server books, and the president of her own consulting firm. She shares her extensive knowledge on developing Windows and Web applications with Experts Exchange members.

  • Tim Chapman is an accomplished Microsoft SQL field engineer. He has answered over 5,000 questions during his time on the network. He has contributed many popular SQL training tutorials to help members of the Expert Exchange community grow their skills.

201409-LO-Qu-013

Experts Exchange powers the growth and success
of technology professionals worldwide.

  • Solve

    Experts Exchange is the tech professional’s trusted, on-demand resource for solving difficult problems, making informed decisions, and delivering excellent solutions.

  • Learn

    With unparalleled access to technical experts, verified real-world solutions, and diverse educational content, Experts Exchange enables personalized development of technology skills.

  • Network

    Experts Exchange gives you the professional exposure and valued relationships key to building the career you want.

Join the Network Today

See Plans and Pricing