Saturday 13 August 2011

Disable Keyboard Shortcuts in Windows

You will have to download a disableshortcuts.dll from this link...


disableshortcuts.dll


Now,





I am using c# that's why I am posting code in my laguage
but as you may know .net's .dlls supports all Microsoft's laguages
so, you easly can write code...
still I am writting a little algo, how to do it


1. import dll in your code project (go to solution explorer, right click references , browse the dll in your code project)


2. add namespace disableshortcuts

3. make an object of Disabler
eg.
Disabler dis=new Disabler();
(make this a class level object)


4. now the object will have 2 functions
diable();and disposeing();


all you have to do is to put disable() at form_load_event
and
don't forget to put disposeing(); at form_close_event


that's all


Jai SiyaRam
God Bless You




c# code:


using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using disableshortcuts;

namespace WindowsFormsApplication1

{

public partial class Form1 : Form


{



public Form1()


{

InitializeComponent();

}



Disabler dis = new Disabler();





private void Form1_Load(object sender, EventArgs e)


{

dis.diable();







}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)



{

dis.disposeing();

}

}

}