posts - 7,  comments - 3,  trackbacks - 0
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Key
{
    
class Hook
    
{
        
public delegate int HookKeyProc(int code, IntPtr wParam, IntPtr lParam);
        
private HookKeyProc hookKeyDeleg;

        
private static int hHookKey = 0;
        
public Hook()
        
{ }
        
public methods

        
protected and private methods

        
P/Invoke declarations

    }

}

应用时,可以将这个类添加到自己的项目中,在要用的地方直接调用,方法如下:

Hook hk=new Hook();
hk.Start();
hk.Stop();

http://www.devdiv.net/viewthread.php?tid=15006&extra=page%3D1%26amp%3Bfilter%3Dtype%26amp%3Btypeid%3D25
posted on 2009-09-22 09:21 老虎爱吃鱼 阅读(106) 评论(0) 编辑 收藏