C#中实现屏幕锁定功能的代码?谁知道~

2025-02-26 04:23:44
推荐回答(3个)
回答1:

You should reference the following website!I hope it will be useful!

public class Win32Hook
{

[DllImport("kernel32")]
public static extern int GetCurrentThreadId();

[DllImport( "user32",
CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]
public static extern int SetWindowsHookEx(
HookType idHook,
HOOKPROC lpfn,
int hmod,
int dwThreadId);

public enum HookType
{
WH_GETMESSAGE = 3
}

public delegate int HOOKPROC(int nCode, int wParam, int lParam);

public void SetHook()
{
// set the keyboard hook
SetWindowsHookEx(HookType.WH_GETMESSAGE,
new HOOKPROC(this.MyKeyboardProc),
0,
GetCurrentThreadId());
}

public int MyKeyboardProc(int nCode, int wParam, int lParam)
{
//Perform your process
return 0;
}
}

Then you can install the hook procedure by the following code:

Win32Hook hook = new Win32Hook();
hook.SetHook();

还有一个 有源码,应该是一个dll
http://www.vckbase.com/document/viewdoc/?id=567

回答2:

function show() {
document.getElementById("xie").style.display = "block";
document.getElementById("content1").style.display = "block";
document.getElementById("xie").style.filter = "Alpha(Opacity=50)"; //透明度
}





回答3:

我有呢,发信到我邮箱我回发给你!!!